preprocessor: removed unnecessary casts
This commit is contained in:
parent
83d5a72659
commit
f5f8d857c1
|
@ -56,7 +56,7 @@ void Preprocessor::writeError(const std::string &fileName, const int linenr, Err
|
||||||
|
|
||||||
static unsigned char readChar(std::istream &istr)
|
static unsigned char readChar(std::istream &istr)
|
||||||
{
|
{
|
||||||
unsigned char ch = (char)istr.get();
|
unsigned char ch = istr.get();
|
||||||
|
|
||||||
// Handling of newlines..
|
// Handling of newlines..
|
||||||
if (ch == '\r')
|
if (ch == '\r')
|
||||||
|
@ -117,7 +117,7 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename,
|
||||||
unsigned char chNext = 0;
|
unsigned char chNext = 0;
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
chNext = (char)istr.peek();
|
chNext = istr.peek();
|
||||||
if (chNext != '\n' && chNext != '\r' &&
|
if (chNext != '\n' && chNext != '\r' &&
|
||||||
(std::isspace(chNext) || std::iscntrl(chNext)))
|
(std::isspace(chNext) || std::iscntrl(chNext)))
|
||||||
{
|
{
|
||||||
|
@ -1611,7 +1611,7 @@ static bool getlines(std::istream &istr, std::string &line)
|
||||||
if (!istr.good())
|
if (!istr.good())
|
||||||
return false;
|
return false;
|
||||||
line = "";
|
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 == '\"')
|
if (ch == '\'' || ch == '\"')
|
||||||
{
|
{
|
||||||
|
@ -1621,13 +1621,13 @@ static bool getlines(std::istream &istr, std::string &line)
|
||||||
{
|
{
|
||||||
if (c == '\\')
|
if (c == '\\')
|
||||||
{
|
{
|
||||||
c = (char)istr.get();
|
c = istr.get();
|
||||||
if (!istr.good())
|
if (!istr.good())
|
||||||
return true;
|
return true;
|
||||||
line += c;
|
line += c;
|
||||||
}
|
}
|
||||||
|
|
||||||
c = (char)istr.get();
|
c = 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)
|
||||||
|
|
Loading…
Reference in New Issue