LChar c = characters8()[i];
if (UNLIKELY(c == smallLetterSharpS))
++numberSharpSCharacters;
- UChar upper = Unicode::toUpper(c);
+ UChar upper = static_cast<UChar>(Unicode::toUpper(c));
if (UNLIKELY(upper > 0xff)) {
// Since this upper-cased character does not fit in an 8-bit string, we need to take the 16-bit path.
goto upconvert;
LChar* data;
RefPtr<StringImpl> newImpl = createUninitialized(m_length, data);
for (unsigned i = 0; i < m_length; ++i)
- data[i] = character;
+ data[i] = static_cast<LChar>(character);
return newImpl.release();
}
UChar* data;
return charactersToUInt64Strict(characters16(), m_length, ok, base);
}
-intptr_t StringImpl::toIntPtrStrict(bool* ok, int base)
-{
- if (is8Bit())
- return charactersToIntPtrStrict(characters8(), m_length, ok, base);
- return charactersToIntPtrStrict(characters16(), m_length, ok, base);
-}
-
int StringImpl::toInt(bool* ok)
{
if (is8Bit())
return charactersToUInt64(characters16(), m_length, ok);
}
-intptr_t StringImpl::toIntPtr(bool* ok)
-{
- if (is8Bit())
- return charactersToIntPtr(characters8(), m_length, ok);
- return charactersToIntPtr(characters16(), m_length, ok);
-}
-
double StringImpl::toDouble(bool* ok)
{
if (is8Bit())