STYLE: pass legacy nCmpt as int

This commit is contained in:
Mark Olesen
2017-06-13 23:59:11 +02:00
parent 7ee1dba43a
commit 8221111245
3 changed files with 6 additions and 5 deletions

View File

@ -199,7 +199,7 @@ namespace legacy
(
std::ostream& os,
const word& name,
const label nCmpt,
const int nCmpt,
const label nEntries
);
@ -208,7 +208,7 @@ namespace legacy
(
std::ostream& os,
const word& name,
const label nCmpt,
const int nCmpt,
const label nEntries
);

View File

@ -123,7 +123,7 @@ inline void Foam::vtk::legacy::floatField
(
std::ostream& os,
const word& fieldName,
const label nCmpt,
const int nCmpt,
const label nEntries
)
{
@ -135,7 +135,7 @@ inline void Foam::vtk::legacy::intField
(
std::ostream& os,
const word& fieldName,
const label nCmpt,
const int nCmpt,
const label nEntries
)
{

View File

@ -32,7 +32,8 @@ inline void Foam::vtk::write
const Type& val
)
{
for (direction cmpt=0; cmpt < pTraits<Type>::nComponents; ++cmpt)
const direction nCmpt = pTraits<Type>::nComponents;
for (direction cmpt=0; cmpt < nCmpt; ++cmpt)
{
fmt.write(component(val, cmpt));
}