fixed compilation in MSVC

mordante: cmath apparently doesn't contain round() here, and round()
also seems not guaranteed to yield consistent results
on different platforms (as opposed to round_portable according to
what its comment says)
(bug #18165)
This commit is contained in:
Anonymissimus 2011-06-05 17:11:15 +00:00
parent 2192aac30d
commit 69c0e582d7

View file

@ -24,6 +24,7 @@
#include "formatter.hpp"
#include "formula_callable.hpp"
#include "formula_function.hpp"
#include "util.hpp"
namespace {
std::string variant_type_to_string(variant::TYPE type) {
@ -684,7 +685,7 @@ variant variant::operator^(const variant& v) const
}
return variant(static_cast<int>(
round(pow(static_cast<double>(as_int()), v.as_int()))));
round_portable(pow(static_cast<double>(as_int()), v.as_int()))));
}
variant variant::operator-() const