if (iTrack >= 1)
{
CStdString strText = g_localizeStrings.Get(554); // "Track"
- if (strText.GetAt(strText.size() - 1) != ' ')
+ if (!strText.empty() && strText[strText.size() - 1] != ' ')
strText += " ";
CStdString strTrack = StringUtils::Format(strText + "%i", iTrack);
GetMusicInfoTag()->SetTitle(strTrack);
bool initialDots = true;
bool alreadyContainsSpace = (strTitleAndYear.find(' ') != std::string::npos);
- for (int i = 0; i < (int)strTitleAndYear.size(); i++)
+ for (size_t i = 0; i < strTitleAndYear.size(); i++)
{
- char c = strTitleAndYear.GetAt(i);
+ char c = strTitleAndYear[i];
if (c != '.')
initialDots = false;
if ((c == '_') || ((!alreadyContainsSpace) && !initialDots && (c == '.')))
{
- strTitleAndYear.SetAt(i, ' ');
+ strTitleAndYear[i] = ' ';
}
}
}
StringUtils::TrimRight(s," \n");
// skip comments
- if (s.length() == 0 || s.GetAt(0) == '#')
+ if (s.empty() || s[0] == '#')
continue;
// look for "iface <interface name> inet"
StringUtils::TrimRight(s," \n");
// skip comments
- if (!foundInterface && (s.length() == 0 || s.GetAt(0) == '#'))
+ if (!foundInterface && (s.empty() || s[0] == '#'))
{
fprintf(fw, "%s", line);
continue;
// -------------------------------------------------------------------------
// GetXXXX -- Direct access to character buffer
// -------------------------------------------------------------------------
- CT GetAt(int nIdx) const
- {
- return this->at(static_cast<MYSIZE>(nIdx));
- }
-
CT* GetBuffer(int nMinLen=-1)
{
return GetBuf(nMinLen);
RelBuf(nNewLen);
}
- void SetAt(int nIndex, CT ch)
- {
- ASSERT(this->size() > static_cast<MYSIZE>(nIndex));
- this->at(static_cast<MYSIZE>(nIndex)) = ch;
- }
-
#ifndef SS_ANSI
BSTR SetSysString(BSTR* pbstr) const
{