bool, int32, int64: Added writeEntry function to avoid ambiguity compiling with 64bit labels
This commit is contained in:
@ -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
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
@ -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<>
|
||||
|
||||
@ -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>
|
||||
|
||||
@ -66,11 +66,6 @@ inline label readLabel(Istream& is)
|
||||
return INT_SIZE(readInt,) (is);
|
||||
}
|
||||
|
||||
inline void writeEntry(Ostream& os, const label value)
|
||||
{
|
||||
os << value;
|
||||
}
|
||||
|
||||
|
||||
// * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
|
||||
|
||||
|
||||
Reference in New Issue
Block a user