1
0
forked from 0ad/0ad

Made To<type> const

This was SVN commit r50.
This commit is contained in:
Gee 2003-11-07 01:56:51 +00:00
parent 24d48f2308
commit eb527a59c3
2 changed files with 12 additions and 12 deletions

View File

@ -75,33 +75,33 @@ CStr::~CStr()
} }
_int CStr::ToInt() _int CStr::ToInt() const
{ {
return _ttoi(m_String.c_str()); return _ttoi(m_String.c_str());
} }
_uint CStr::ToUInt() _uint CStr::ToUInt() const
{ {
return _uint(_ttoi(m_String.c_str())); return _uint(_ttoi(m_String.c_str()));
} }
_long CStr::ToLong() _long CStr::ToLong() const
{ {
return _ttol(m_String.c_str()); return _ttol(m_String.c_str());
} }
_ulong CStr::ToULong() _ulong CStr::ToULong() const
{ {
return _ulong(_ttol(m_String.c_str())); return _ulong(_ttol(m_String.c_str()));
} }
_float CStr::ToFloat() _float CStr::ToFloat() const
{ {
return _tstod(m_String.c_str(), NULL); return _tstod(m_String.c_str(), NULL);
} }
_double CStr::ToDouble() _double CStr::ToDouble() const
{ {
return _tstod(m_String.c_str(), NULL); return _tstod(m_String.c_str(), NULL);
} }

View File

@ -102,12 +102,12 @@ public:
~CStr(); // Destructor ~CStr(); // Destructor
// Conversions // Conversions
_int ToInt(); _int ToInt() const;
_uint ToUInt(); _uint ToUInt() const;
_long ToLong(); _long ToLong() const;
_ulong ToULong(); _ulong ToULong() const;
_float ToFloat(); _float ToFloat() const;
_double ToDouble(); _double ToDouble() const;
_long Length(){return m_String.length();} _long Length(){return m_String.length();}
// Retrieves the substring within the string // Retrieves the substring within the string