preprocessor: removed unnecessary casts

This commit is contained in:
Daniel Marjamäki 2009-12-21 20:26:57 +01:00
parent 83d5a72659
commit f5f8d857c1
1 changed files with 5 additions and 5 deletions

View File

@ -56,7 +56,7 @@ void Preprocessor::writeError(const std::string &fileName, const int linenr, Err
static unsigned char readChar(std::istream &istr)
{
unsigned char ch = (char)istr.get();
unsigned char ch = istr.get();
// Handling of newlines..
if (ch == '\r')
@ -117,7 +117,7 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename,
unsigned char chNext = 0;
for (;;)
{
chNext = (char)istr.peek();
chNext = istr.peek();
if (chNext != '\n' && chNext != '\r' &&
(std::isspace(chNext) || std::iscntrl(chNext)))
{
@ -1611,7 +1611,7 @@ static bool getlines(std::istream &istr, std::string &line)
if (!istr.good())
return false;
line = "";
for (unsigned char ch = (char)istr.get(); istr.good(); ch = (char)istr.get())
for (unsigned char ch = istr.get(); istr.good(); ch = istr.get())
{
if (ch == '\'' || ch == '\"')
{
@ -1621,13 +1621,13 @@ static bool getlines(std::istream &istr, std::string &line)
{
if (c == '\\')
{
c = (char)istr.get();
c = istr.get();
if (!istr.good())
return true;
line += c;
}
c = (char)istr.get();
c = istr.get();
if (!istr.good())
return true;
if (c == '\n' && line.compare(0, 1, "#") == 0)