bool, int32, int64: Added writeEntry function to avoid ambiguity compiling with 64bit labels

This commit is contained in:
Henry Weller
2019-07-09 11:29:43 +01:00
parent 3431c1d21e
commit 481f643aec
4 changed files with 18 additions and 6 deletions

View File

@ -50,8 +50,14 @@ Ostream& operator<<(Ostream&, const bool);
bool readBool(Istream&);
} // End namespace Foam
inline void writeEntry(Ostream& os, const bool value)
{
os << value;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
} // End namespace Foam
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //

View File

@ -72,6 +72,11 @@ Ostream& operator<<(Ostream&, const int32_t);
Ostream& operator<<(Ostream&, const long);
#endif
inline void writeEntry(Ostream& os, const int32_t value)
{
os << value;
}
//- Template specialization for pTraits<int32_t>
template<>

View File

@ -68,6 +68,12 @@ bool read(const char*, int64_t&);
Istream& operator>>(Istream&, int64_t&);
Ostream& operator<<(Ostream&, const int64_t);
inline void writeEntry(Ostream& os, const int64_t value)
{
os << value;
}
//- Template specialization for pTraits<int64_t>
template<>
class pTraits<int64_t>

View File

@ -66,11 +66,6 @@ inline label readLabel(Istream& is)
return INT_SIZE(readInt,) (is);
}
inline void writeEntry(Ostream& os, const label value)
{
os << value;
}
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //