mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-07-24 22:52:18 +00:00
Fix -Wconversion warnings in simulation code.
Cast to smaller integer types explicitly. Generally avoid platform-dependent types (size_t) in simulation code. Use float versions of math.h functions, not double. This was SVN commit r10017.
This commit is contained in:
@@ -39,7 +39,7 @@
|
||||
// across platforms, we want to convert to a canonical form.
|
||||
// TODO: we just do e+0xx now; ought to handle varying precisions and inf and nan etc too
|
||||
template<typename T>
|
||||
std::string canonfloat(T value, size_t prec)
|
||||
std::string canonfloat(T value, int prec)
|
||||
{
|
||||
std::stringstream str;
|
||||
str << std::setprecision(prec) << value;
|
||||
|
||||
Reference in New Issue
Block a user