STYLE: consistent ordering of is_same parameters

This commit is contained in:
Mark Olesen
2019-01-10 07:55:53 +01:00
parent 7720b59066
commit c52d70cce3
6 changed files with 16 additions and 29 deletions

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,16 +53,12 @@ void Foam::vtk::indirectPatchWriter::write
static_assert
(
(
std::is_same<typename pTraits<Type>::cmptType,label>::value
std::is_same<label, typename pTraits<Type>::cmptType>::value
|| std::is_floating_point<typename pTraits<Type>::cmptType>::value
),
"Label and Floating-point vector space only"
);
const bool isLabel =
std::is_same<typename pTraits<Type>::cmptType(), label>::value;
const direction nCmpt(pTraits<Type>::nComponents);
label nValues = field.size();
@ -78,7 +74,7 @@ void Foam::vtk::indirectPatchWriter::write
if (format_)
{
if (isLabel)
if (std::is_same<label, typename pTraits<Type>::cmptType>::value)
{
if (legacy())
{

View File

@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2018 OpenCFD Ltd.
\\ / A nd | Copyright (C) 2018-2019 OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
@ -53,15 +53,12 @@ void Foam::vtk::surfaceWriter::write
static_assert
(
(
std::is_same<typename pTraits<Type>::cmptType,label>::value
std::is_same<label, typename pTraits<Type>::cmptType>::value
|| std::is_floating_point<typename pTraits<Type>::cmptType>::value
),
"Label and Floating-point vector space only"
);
const bool isLabel =
std::is_same<typename pTraits<Type>::cmptType(), label>::value;
const direction nCmpt(pTraits<Type>::nComponents);
@ -78,7 +75,7 @@ void Foam::vtk::surfaceWriter::write
if (format_)
{
if (isLabel)
if (std::is_same<label, typename pTraits<Type>::cmptType>::value)
{
if (legacy())
{