Fix ticket #148 (unable to compile with g++-3.3)

http://apps.sourceforge.net/trac/cppcheck/ticket/148
This commit is contained in:
Reijo Tomperi 2009-03-08 20:50:19 +02:00
parent 8e32753ec1
commit de1a786a07
1 changed files with 8 additions and 2 deletions

View File

@ -67,7 +67,10 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
iss.get();
std::string temp;
for (unsigned int i = 0; i < len && iss.good(); ++i)
temp.append(1, iss.get());
{
char c = iss.get();
temp.append(1, c);
}
results.push_back(temp);
if (results.size() == 3)
@ -91,7 +94,10 @@ bool ErrorLogger::ErrorMessage::deserialize(const std::string &data)
iss.get();
std::string temp;
for (unsigned int i = 0; i < len && iss.good(); ++i)
temp.append(1, iss.get());
{
char c = iss.get();
temp.append(1, c);
}
ErrorLogger::ErrorMessage::FileLocation loc;
loc.file = temp.substr(temp.find(':') + 1);