Skip to content

Commit

Permalink
fix msvc conversion warning
Browse files Browse the repository at this point in the history
  • Loading branch information
pantor committed May 16, 2023
1 parent 6b7b9f1 commit c2ad85d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion include/inja/renderer.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down
2 changes: 1 addition & 1 deletion single_include/inja/inja.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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));
Expand Down

0 comments on commit c2ad85d

Please sign in to comment.