visual studio: fixed a few compiler warnings (when saving istream::get result in a char)

This commit is contained in:
Daniel Marjamäki 2010-08-07 20:33:24 +02:00
parent 029613d4c4
commit dcf54621d4
1 changed files with 3 additions and 3 deletions

View File

@ -1923,7 +1923,7 @@ static bool getlines(std::istream &istr, std::string &line)
return false; return false;
line = ""; line = "";
int parlevel = 0; int parlevel = 0;
for (char ch = istr.get(); istr.good(); ch = istr.get()) for (char ch = (char)istr.get(); istr.good(); ch = (char)istr.get())
{ {
if (ch == '\'' || ch == '\"') if (ch == '\'' || ch == '\"')
{ {
@ -1933,13 +1933,13 @@ static bool getlines(std::istream &istr, std::string &line)
{ {
if (c == '\\') if (c == '\\')
{ {
c = istr.get(); c = (char)istr.get();
if (!istr.good()) if (!istr.good())
return true; return true;
line += c; line += c;
} }
c = istr.get(); c = (char)istr.get();
if (!istr.good()) if (!istr.good())
return true; return true;
if (c == '\n' && line.compare(0, 1, "#") == 0) if (c == '\n' && line.compare(0, 1, "#") == 0)