FString fix for 32-bit architectures
This commit is contained in:
parent
de4be23a04
commit
4fac4627cd
|
@ -443,24 +443,6 @@ const FString& FString::operator >> (float& num)
|
|||
return *this;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
wchar_t& FString::operator [] (std::size_t pos)
|
||||
{
|
||||
if ( pos >= length )
|
||||
throw std::out_of_range(""); // Invalid index position
|
||||
|
||||
return string[pos];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const wchar_t& FString::operator [] (std::size_t pos) const
|
||||
{
|
||||
if ( pos >= length )
|
||||
throw std::out_of_range(""); // Invalid index position
|
||||
|
||||
return string[pos];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString& FString::operator () ()
|
||||
{
|
||||
|
|
|
@ -137,8 +137,6 @@ class FString
|
|||
wchar_t& operator [] (IndexT);
|
||||
template <typename IndexT>
|
||||
const wchar_t& operator [] (IndexT) const;
|
||||
wchar_t& operator [] (std::size_t);
|
||||
const wchar_t& operator [] (std::size_t) const;
|
||||
const FString& operator () ();
|
||||
|
||||
bool operator < (const FString&) const;
|
||||
|
@ -292,12 +290,22 @@ inline const char* FString::getClassName()
|
|||
//----------------------------------------------------------------------
|
||||
template <typename IndexT>
|
||||
inline wchar_t& FString::operator [] (IndexT pos)
|
||||
{ return string[std::size_t(pos)]; }
|
||||
{
|
||||
if ( pos < 0 || pos >= IndexT(length) )
|
||||
throw std::out_of_range(""); // Invalid index position
|
||||
|
||||
return string[std::size_t(pos)];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
template <typename IndexT>
|
||||
inline const wchar_t& FString::operator [] (IndexT pos) const
|
||||
{ return string[std::size_t(pos)]; }
|
||||
{
|
||||
if ( pos < 0 || pos >= IndexT(length) )
|
||||
throw std::out_of_range(""); // Invalid index position
|
||||
|
||||
return string[std::size_t(pos)];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
template <class CharT>
|
||||
|
|
Loading…
Reference in New Issue