Skip to content

Commit c2ad85d

Browse files
committed
fix msvc conversion warning
1 parent 6b7b9f1 commit c2ad85d

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/inja/renderer.hpp

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

single_include/inja/inja.hpp

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

0 commit comments

Comments
 (0)