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:
Ykkrosh
2011-08-16 11:18:32 +00:00
parent b40b5b8414
commit 609f1643d5
34 changed files with 308 additions and 263 deletions
@@ -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;