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/option.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/option.cc')
-rw-r--r-- | src/option.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/option.cc b/src/option.cc index 02ae3040..2843c775 100644 --- a/src/option.cc +++ b/src/option.cc @@ -133,7 +133,7 @@ void process_environment(const char ** envp, const string& tag, if (*q == '=') { try { - string value = string(*p, q - *p); + string value = string(*p, static_cast<std::string::size_type>(q - *p)); if (! value.empty()) process_option(string("$") + buf, string(buf), scope, q + 1, value); } @@ -190,7 +190,7 @@ strings_list process_arguments(strings_list args, scope_t& scope) const char * value = NULL; if (const char * p = std::strchr(name, '=')) { - opt_name = string(name, p - name); + opt_name = string(name, static_cast<std::string::size_type>(p - name)); value = ++p; DEBUG("option.args", " read option value from option: " << value); } else { |