Skip to content

Commit

Permalink
Static cast int to char in kconfig
Browse files Browse the repository at this point in the history
  • Loading branch information
darddan committed Nov 29, 2019
1 parent 7638958 commit 1a52eb6
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/plugins/kconfig/file_utility.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ FileUtility::FileUtility (std::string filenameParam, std::unique_ptr<std::istrea

char FileUtility::peekNextChar ()
{
return this->file->peek ();
return static_cast<char>(this->file->peek ());
}

bool FileUtility::isNextCharEOF ()
Expand Down Expand Up @@ -66,7 +66,7 @@ void FileUtility::skipLine ()
++currentLine;
while (true)
{
switch (this->file->get ())
switch (static_cast<char>(this->file->get ()))
{
case character_newline:
return;
Expand Down Expand Up @@ -101,7 +101,7 @@ void FileUtility::skipLineIfEmptyOrComment ()

inline void FileUtility::readEscapedChar (std::ostream & str)
{
switch (this->file->get ())
switch (static_cast<char>(this->file->get ()))
{
case 'n':
str << '\n';
Expand All @@ -125,7 +125,7 @@ void FileUtility::readUntilChar (std::ostream & str, const char & delimiter)
char c;
while (true)
{
c = this->file->get ();
c = static_cast<char>(this->file->get ());

if (c == EOF && isNextCharEOF ())
{
Expand All @@ -152,7 +152,7 @@ void FileUtility::readUntilChar (std::ostream & str, const char & delimiterA, co
char c;
while (true)
{
c = this->file->get ();
c = static_cast<char>(this->file->get ());
if (c == EOF && isNextCharEOF ())
{
break;
Expand Down

0 comments on commit 1a52eb6

Please sign in to comment.