summaryrefslogtreecommitdiff
path: root/cpp/src/IceUtil/StringUtil.cpp
diff options
context:
space:
mode:
authorJose <jose@zeroc.com>2014-10-30 16:03:47 +0100
committerJose <jose@zeroc.com>2014-10-30 16:03:47 +0100
commitda8c267316512436ba19f28fa42510be305093f6 (patch)
tree935f3eefd77e909c847a44883fef38fce4bda48d /cpp/src/IceUtil/StringUtil.cpp
parentMerge branch 'master' of ssh://git/home/git/ice (diff)
downloadice-da8c267316512436ba19f28fa42510be305093f6.tar.bz2
ice-da8c267316512436ba19f28fa42510be305093f6.tar.xz
ice-da8c267316512436ba19f28fa42510be305093f6.zip
ICE-5804 - Warnings when building with GCC (Eliminate C style casts)
Diffstat (limited to 'cpp/src/IceUtil/StringUtil.cpp')
-rw-r--r--cpp/src/IceUtil/StringUtil.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpp/src/IceUtil/StringUtil.cpp b/cpp/src/IceUtil/StringUtil.cpp
index e8b234f91e3..b45298a6e98 100644
--- a/cpp/src/IceUtil/StringUtil.cpp
+++ b/cpp/src/IceUtil/StringUtil.cpp
@@ -178,7 +178,7 @@ checkChar(const string& s, string::size_type pos)
{
ostr << "first character";
}
- ostr << " is not a printable ASCII character (ordinal " << (int)c << ")";
+ ostr << " is not a printable ASCII character (ordinal " << static_cast<int>(c) << ")";
throw IllegalArgumentException(__FILE__, __LINE__, ostr.str());
}
return c;
@@ -273,7 +273,7 @@ decodeChar(const string& s, string::size_type start, string::size_type end, stri
ostr << "octal value \\" << oct << val << dec << " (" << val << ") is out of range";
throw IllegalArgumentException(__FILE__, __LINE__, ostr.str());
}
- c = (char)val;
+ c = static_cast<char>(val);
break;
}
default: