Visual Studio: Added casts to silence compiler warnings

This commit is contained in:
Daniel Marjamäki 2009-12-22 22:44:21 +01:00
parent cd2e501794
commit 305ef25208
2 changed files with 8 additions and 5 deletions

View File

@ -33,6 +33,9 @@ class ExecutionPath
private: private:
bool bailout_; bool bailout_;
/** No implementation */
void operator=(const ExecutionPath &);
protected: protected:
const unsigned int varId; const unsigned int varId;
Check * const owner; Check * const owner;

View File

@ -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 = istr.get(); unsigned char ch = (unsigned char)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 = istr.peek(); chNext = (unsigned char)istr.peek();
if (chNext != '\n' && chNext != '\r' && if (chNext != '\n' && chNext != '\r' &&
(std::isspace(chNext) || std::iscntrl(chNext))) (std::isspace(chNext) || std::iscntrl(chNext)))
{ {
@ -1624,7 +1624,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 = istr.get(); istr.good(); ch = istr.get()) for (unsigned char ch = (unsigned char)istr.get(); istr.good(); ch = (unsigned char)istr.get())
{ {
if (ch == '\'' || ch == '\"') if (ch == '\'' || ch == '\"')
{ {
@ -1634,13 +1634,13 @@ static bool getlines(std::istream &istr, std::string &line)
{ {
if (c == '\\') if (c == '\\')
{ {
c = istr.get(); c = (unsigned char)istr.get();
if (!istr.good()) if (!istr.good())
return true; return true;
line += c; line += c;
} }
c = istr.get(); c = (unsigned 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)