casting fun...

This commit is contained in:
andy
2008-08-19 19:16:37 +01:00
parent d0ace8ce82
commit e2b73a3a36
3 changed files with 3 additions and 9 deletions

View File

@ -203,7 +203,7 @@ Foam::Ostream& Foam::operator<<
os << static_cast<const Particle<ParcelType>& >(p);
os.write
(
reinterpret_cast<const char*>(p.typeId()),
reinterpret_cast<const char*>(&p.typeId_),
sizeof(p.typeId())
+ sizeof(p.d())
+ sizeof(p.U())

View File

@ -297,10 +297,7 @@ Foam::Ostream& Foam::operator<<
os << static_cast<const ThermoParcel<ParcelType>& >(p);
os.write
(
reinterpret_cast<const char*>
(
&const_cast<ReactingParcel<ParcelType>&>(p).mass0()
),
reinterpret_cast<const char*>(&p.mass0_),
sizeof(p.mass0())
);
os << p.YMixture() << YGasLoc << YLiquidLoc << YSolidLoc;

View File

@ -149,10 +149,7 @@ Foam::Ostream& Foam::operator<<
os << static_cast<const KinematicParcel<ParcelType>& >(p);
os.write
(
reinterpret_cast<const char*>
(
&const_cast<ThermoParcel<ParcelType>&>(p).T()
),
reinterpret_cast<const char*>(&p.T_),
sizeof(p.T()) + sizeof(p.cp())
);
}