mirror of
https://develop.openfoam.com/Development/openfoam.git
synced 2025-11-28 03:28:01 +00:00
STYLE: improve consistency in pointer casts
This commit is contained in:
@ -173,11 +173,7 @@ Foam::Ostream& Foam::ensightFile::write(const char* value)
|
|||||||
|
|
||||||
if (format() == IOstream::BINARY)
|
if (format() == IOstream::BINARY)
|
||||||
{
|
{
|
||||||
write
|
write(buf, sizeof(buf));
|
||||||
(
|
|
||||||
reinterpret_cast<char const *>(buf),
|
|
||||||
sizeof(buf)
|
|
||||||
);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -204,7 +200,7 @@ Foam::Ostream& Foam::ensightFile::write(const label value)
|
|||||||
|
|
||||||
write
|
write
|
||||||
(
|
(
|
||||||
reinterpret_cast<char const *>(&ivalue),
|
reinterpret_cast<const char *>(&ivalue),
|
||||||
sizeof(ivalue)
|
sizeof(ivalue)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -230,7 +226,7 @@ Foam::Ostream& Foam::ensightFile::write
|
|||||||
|
|
||||||
write
|
write
|
||||||
(
|
(
|
||||||
reinterpret_cast<char const *>(&ivalue),
|
reinterpret_cast<const char *>(&ivalue),
|
||||||
sizeof(ivalue)
|
sizeof(ivalue)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
@ -252,7 +248,7 @@ Foam::Ostream& Foam::ensightFile::write(const scalar value)
|
|||||||
{
|
{
|
||||||
write
|
write
|
||||||
(
|
(
|
||||||
reinterpret_cast<char const *>(&fvalue),
|
reinterpret_cast<const char *>(&fvalue),
|
||||||
sizeof(fvalue)
|
sizeof(fvalue)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user