diff options
author | John Wiegley <johnw@newartisans.com> | 2012-02-17 15:17:52 -0600 |
---|---|---|
committer | John Wiegley <johnw@newartisans.com> | 2012-02-17 15:17:52 -0600 |
commit | c3a9a7d2c584a7651426b3516f4e9991c8063e02 (patch) | |
tree | 6a7748588d90d3d9e0032903548b3411d7277dd6 /src/report.cc | |
parent | c6b51a2635bdf7da803dd2fc8251d6c290f134a4 (diff) | |
download | fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.gz fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.tar.bz2 fork-ledger-c3a9a7d2c584a7651426b3516f4e9991c8063e02.zip |
Fixed many Clang type conversion warnings with static_cast
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) |