fix msvc conversion warning

This commit is contained in:
pantor
2023-05-16 07:37:17 +02:00
parent 6b7b9f1604
commit c2ad85db6d
2 changed files with 2 additions and 2 deletions

View File

@@ -375,7 +375,7 @@ class Renderer : public NodeVisitor {
} break;
case Op::Round: {
const auto args = get_arguments<2>(node);
const int precision = args[1]->get<const json::number_integer_t>();
const auto precision = args[1]->get<const json::number_integer_t>();
const double result = std::round(args[0]->get<const json::number_float_t>() * std::pow(10.0, precision)) / std::pow(10.0, precision);
if (precision == 0) {
make_result(int(result));

View File

@@ -2444,7 +2444,7 @@ class Renderer : public NodeVisitor {
} break;
case Op::Round: {
const auto args = get_arguments<2>(node);
const int precision = args[1]->get<const json::number_integer_t>();
const auto precision = args[1]->get<const json::number_integer_t>();
const double result = std::round(args[0]->get<const json::number_float_t>() * std::pow(10.0, precision)) / std::pow(10.0, precision);
if (precision == 0) {
make_result(int(result));