|
|
@@ -56,7 +56,7 @@ bool peek(cmsys::ifstream& fin, T& v)
|
|
|
template <typename T>
|
|
|
bool read(cmsys::ifstream& fin, T& v)
|
|
|
{
|
|
|
- return !!fin.read(reinterpret_cast<char*>(&v), sizeof(T));
|
|
|
+ return static_cast<bool>(fin.read(reinterpret_cast<char*>(&v), sizeof(T)));
|
|
|
}
|
|
|
|
|
|
// read from the file and fill multiple data structures where
|
|
|
@@ -68,7 +68,8 @@ bool read(cmsys::ifstream& fin, std::vector<T>& v)
|
|
|
if (v.empty()) {
|
|
|
return true;
|
|
|
}
|
|
|
- return !!fin.read(reinterpret_cast<char*>(&v[0]), sizeof(T) * v.size());
|
|
|
+ return static_cast<bool>(
|
|
|
+ fin.read(reinterpret_cast<char*>(&v[0]), sizeof(T) * v.size()));
|
|
|
}
|
|
|
}
|
|
|
|