Source cleaning.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@39713 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1181,7 +1181,7 @@ wxString operator+(const wxString& str, const wxChar *psz)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxString s;
|
wxString s;
|
||||||
if ( !s.Alloc(wxStrlen(psz) + str.Len()) ) {
|
if ( !s.Alloc(wxStrlen(psz) + str.length()) ) {
|
||||||
wxFAIL_MSG( _T("out of memory in wxString::operator+") );
|
wxFAIL_MSG( _T("out of memory in wxString::operator+") );
|
||||||
}
|
}
|
||||||
s += str;
|
s += str;
|
||||||
@@ -1197,7 +1197,7 @@ wxString operator+(const wxChar *psz, const wxString& str)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
wxString s;
|
wxString s;
|
||||||
if ( !s.Alloc(wxStrlen(psz) + str.Len()) ) {
|
if ( !s.Alloc(wxStrlen(psz) + str.length()) ) {
|
||||||
wxFAIL_MSG( _T("out of memory in wxString::operator+") );
|
wxFAIL_MSG( _T("out of memory in wxString::operator+") );
|
||||||
}
|
}
|
||||||
s = psz;
|
s = psz;
|
||||||
@@ -1609,7 +1609,7 @@ wxString& wxString::Trim(bool bFromRight)
|
|||||||
// first check if we're going to modify the string at all
|
// first check if we're going to modify the string at all
|
||||||
if ( !empty() &&
|
if ( !empty() &&
|
||||||
(
|
(
|
||||||
(bFromRight && wxSafeIsspace(GetChar(Len() - 1))) ||
|
(bFromRight && wxSafeIsspace(GetChar(length() - 1))) ||
|
||||||
(!bFromRight && wxSafeIsspace(GetChar(0u)))
|
(!bFromRight && wxSafeIsspace(GetChar(0u)))
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
@@ -1659,7 +1659,8 @@ wxString& wxString::Pad(size_t nCount, wxChar chPad, bool bFromRight)
|
|||||||
// truncate the string
|
// truncate the string
|
||||||
wxString& wxString::Truncate(size_t uiLen)
|
wxString& wxString::Truncate(size_t uiLen)
|
||||||
{
|
{
|
||||||
if ( uiLen < Len() ) {
|
if ( uiLen < length() )
|
||||||
|
{
|
||||||
erase(begin() + uiLen, end());
|
erase(begin() + uiLen, end());
|
||||||
}
|
}
|
||||||
//else: nothing to do, string is already short enough
|
//else: nothing to do, string is already short enough
|
||||||
@@ -1819,7 +1820,7 @@ int wxString::PrintfV(const wxChar* pszFormat, va_list argptr)
|
|||||||
// we could have overshot
|
// we could have overshot
|
||||||
Shrink();
|
Shrink();
|
||||||
|
|
||||||
return Len();
|
return length();
|
||||||
}
|
}
|
||||||
|
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
@@ -1968,7 +1969,7 @@ match:
|
|||||||
int wxString::Freq(wxChar ch) const
|
int wxString::Freq(wxChar ch) const
|
||||||
{
|
{
|
||||||
int count = 0;
|
int count = 0;
|
||||||
int len = Len();
|
int len = length();
|
||||||
for (int i = 0; i < len; i++)
|
for (int i = 0; i < len; i++)
|
||||||
{
|
{
|
||||||
if (GetChar(i) == ch)
|
if (GetChar(i) == ch)
|
||||||
|
Reference in New Issue
Block a user