Fix more krazy warnings.

This commit is contained in:
Friedemann Kleint
2011-04-19 15:42:14 +02:00
parent cca52b6d30
commit 774fa49412
66 changed files with 137 additions and 136 deletions

View File

@@ -95,7 +95,7 @@ void simplify(std::string &s)
void replace(std::wstring &s, wchar_t before, wchar_t after)
{
const std::wstring::size_type size = s.size();
for (std::wstring::size_type i = 0; i < size; i++)
for (std::wstring::size_type i = 0; i < size; ++i)
if (s.at(i) == before)
s[i] = after;
}
@@ -146,14 +146,14 @@ static inline void formatGdbmiChar(std::ostream &str, wchar_t c)
void gdbmiStringFormat::format(std::ostream &str) const
{
const std::string::size_type size = m_s.size();
for (std::string::size_type i = 0; i < size; i++)
for (std::string::size_type i = 0; i < size; ++i)
formatGdbmiChar(str, wchar_t(m_s.at(i)));
}
void gdbmiWStringFormat::format(std::ostream &str) const
{
const std::wstring::size_type size = m_w.size();
for (std::wstring::size_type i = 0; i < size; i++)
for (std::wstring::size_type i = 0; i < size; ++i)
formatGdbmiChar(str, m_w.at(i));
}
@@ -171,7 +171,7 @@ std::string wStringToString(const std::wstring &w)
const std::string::size_type size = w.size();
std::string rc;
rc.reserve(size);
for (std::string::size_type i = 0; i < size; i++)
for (std::string::size_type i = 0; i < size; ++i)
rc.push_back(char(w.at(i)));
return rc;
}
@@ -183,7 +183,7 @@ std::wstring stringToWString(const std::string &w)
const std::wstring::size_type size = w.size();
std::wstring rc;
rc.reserve(size);
for (std::wstring::size_type i = 0; i < size; i++)
for (std::wstring::size_type i = 0; i < size; ++i)
rc.push_back(w.at(i));
return rc;
}