STYLE: improve consistency in pointer casts

This commit is contained in:
Mark Olesen
2016-06-09 10:10:26 +01:00
parent ac6f01ed7a
commit e31ad7be29

View File

@ -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)
); );
} }