diff options
Diffstat (limited to 'src/report.cc')
-rw-r--r-- | src/report.cc | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/report.cc b/src/report.cc index b943fd3e..f4dc450e 100644 --- a/src/report.cc +++ b/src/report.cc @@ -577,7 +577,7 @@ value_t report_t::fn_trim(call_scope_t& args) return string_value(empty_string); } else { - return string_value(string(p, e - p)); + return string_value(string(p, static_cast<std::string::size_type>(e - p))); } } @@ -641,9 +641,10 @@ value_t report_t::fn_truncated(call_scope_t& args) { return string_value(format_t::truncate (args.get<string>(0), - (args.has<int>(1) && - args.get<int>(1) > 0) ? args.get<int>(1) : 0, - args.has<int>(2) ? args.get<int>(2) : 0)); + (args.has<int>(1) && args.get<int>(1) > 0) ? + static_cast<std::size_t>(args.get<int>(1)) : 0, + args.has<int>(2) ? + static_cast<std::size_t>(args.get<int>(2)) : 0)); } value_t report_t::fn_justify(call_scope_t& args) |