fixed GH #1425: Workaround bug in SolarisStudio 12.4 on RVO-ed objects.

This commit is contained in:
Günter Obiltschnig 2017-11-08 15:05:40 +01:00
parent 18a70a4b3a
commit f4530b0ebc

View File

@ -403,9 +403,9 @@ S translateInPlace(S& str, const typename S::value_type* from, const typename S:
poco_check_ptr (to);
str = translate(str, S(from), S(to));
#if defined(__SUNPRO_CC)
// Fix around the RVO bug in SunStudio 12.4
S ret(str);
return ret;
// Fix around the RVO bug in SunStudio 12.4
S ret(str);
return ret;
#else
return str;
#endif
@ -666,7 +666,7 @@ struct i_char_traits : public std::char_traits<charT>
return Ascii::toLower(c1) < Ascii::toLower(c2);
}
static int compare(const charT* s1, const charT* s2, size_t n)
static int compare(const charT* s1, const charT* s2, std::size_t n)
{
for (int i = 0; i < n && s1 && s2; ++i, ++s1, ++s2)
{