Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Development
openfoam
Commits
c52d70cc
Commit
c52d70cc
authored
Jan 10, 2019
by
Mark OLESEN
Browse files
STYLE: consistent ordering of is_same parameters
parent
7720b590
Changes
6
Hide whitespace changes
Inline
Side-by-side
src/OpenFOAM/containers/Lists/List/List.H
View file @
c52d70cc
...
...
@@ -322,7 +322,7 @@ public:
//
// \return True if value changed.
template
<
class
TypeT
=
T
>
typename
std
::
enable_if
<
std
::
is_same
<
TypeT
,
bool
>::
value
,
bool
>::
type
typename
std
::
enable_if
<
std
::
is_same
<
bool
,
TypeT
>::
value
,
bool
>::
type
inline
set
(
const
label
i
,
bool
val
=
true
)
{
if
(
i
<
0
)
...
...
src/OpenFOAM/containers/Lists/UList/UList.H
View file @
c52d70cc
...
...
@@ -501,7 +501,7 @@ public:
//
// \return The element value, or false for out-of-range access
template
<
class
TypeT
=
T
>
typename
std
::
enable_if
<
std
::
is_same
<
TypeT
,
bool
>::
value
,
bool
>::
type
typename
std
::
enable_if
<
std
::
is_same
<
bool
,
TypeT
>::
value
,
bool
>::
type
inline
test
(
const
label
i
)
const
{
return
(
i
>=
0
&&
i
<
size
()
&&
v_
[
i
]);
...
...
@@ -511,7 +511,7 @@ public:
//
// \return The element value, or false for out-of-range access
template
<
class
TypeT
=
T
>
typename
std
::
enable_if
<
std
::
is_same
<
TypeT
,
bool
>::
value
,
bool
>::
type
typename
std
::
enable_if
<
std
::
is_same
<
bool
,
TypeT
>::
value
,
bool
>::
type
inline
get
(
const
label
i
)
const
{
return
(
i
>=
0
&&
i
<
size_
&&
v_
[
i
]);
...
...
@@ -521,7 +521,7 @@ public:
//
// \return True if value changed and was not out-of-range
template
<
class
TypeT
=
T
>
typename
std
::
enable_if
<
std
::
is_same
<
TypeT
,
bool
>::
value
,
bool
>::
type
typename
std
::
enable_if
<
std
::
is_same
<
bool
,
TypeT
>::
value
,
bool
>::
type
inline
unset
(
const
label
i
)
{
if
(
i
>=
0
&&
i
<
size_
&&
v_
[
i
])
...
...
src/functionObjects/lagrangian/vtkCloud/vtkCloudTemplates.C
View file @
c52d70cc
...
...
@@ -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
...
...
@@ -40,15 +40,12 @@ Foam::wordList Foam::functionObjects::vtkCloud::writeFields
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
;
// Other integral types (eg, bool etc) would need cast/convert to label.
// Similarly for labelVector etc.
...
...
@@ -70,7 +67,7 @@ Foam::wordList Foam::functionObjects::vtkCloud::writeFields
if
(
Pstream
::
master
())
{
if
(
isLabel
)
if
(
std
::
is_same
<
label
,
typename
pTraits
<
Type
>::
cmptType
>::
value
)
{
const
uint64_t
payLoad
=
vtk
::
sizeofData
<
label
,
nCmpt
>
(
nTotParcels
);
...
...
src/lagrangian/intermediate/conversion/vtk/foamVtkLagrangianWriterTemplates.C
View file @
c52d70cc
...
...
@@ -2,7 +2,7 @@
========= |
\\ / F ield | OpenFOAM: The Open Source CFD Toolbox
\\ / O peration |
\\ / A nd | Copyright (C) 2016-201
8
OpenCFD Ltd.
\\ / A nd | Copyright (C) 2016-201
9
OpenCFD Ltd.
\\/ M anipulation |
-------------------------------------------------------------------------------
License
...
...
@@ -53,7 +53,7 @@ void Foam::vtk::lagrangianWriter::write(const IOField<Type>& field)
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"
...
...
@@ -72,9 +72,6 @@ void Foam::vtk::lagrangianWriter::write(const IOField<Type>& field)
// }
// }
const
bool
isLabel
=
std
::
is_same
<
typename
pTraits
<
Type
>::
cmptType
(),
label
>::
value
;
const
direction
nCmpt
(
pTraits
<
Type
>::
nComponents
);
...
...
@@ -89,7 +86,7 @@ void Foam::vtk::lagrangianWriter::write(const IOField<Type>& field)
{
// Non-legacy
if
(
isLabel
)
if
(
std
::
is_same
<
label
,
typename
pTraits
<
Type
>::
cmptType
>::
value
)
{
const
uint64_t
payLoad
=
vtk
::
sizeofData
<
label
,
nCmpt
>
(
nVals
);
...
...
src/meshTools/output/foamVtkIndPatchWriterTemplates.C
View file @
c52d70cc
...
...
@@ -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
())
{
...
...
src/meshTools/output/foamVtkSurfaceWriterTemplates.C
View file @
c52d70cc
...
...
@@ -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
())
{
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment