Fix Cppcheck warning. Make function Preprocessor::readpreprocessor static instead of const.

This commit is contained in:
Daniel Marjamäki 2014-07-25 12:43:55 +02:00
parent 499821de4d
commit 216ecd06e1
2 changed files with 2 additions and 2 deletions

View File

@ -279,7 +279,7 @@ std::string Preprocessor::read(std::istream &istr, const std::string &filename)
/** read preprocessor statements */
std::string Preprocessor::readpreprocessor(std::istream &istr, const unsigned int bom) const
std::string Preprocessor::readpreprocessor(std::istream &istr, const unsigned int bom)
{
enum { NEWLINE, SPACE, PREPROCESSOR, BACKSLASH, OTHER } state = NEWLINE;
std::ostringstream code;

View File

@ -95,7 +95,7 @@ public:
std::string read(std::istream &istr, const std::string &filename);
/** read preprocessor statements into a string. */
std::string readpreprocessor(std::istream &istr, const unsigned int bom) const;
static std::string readpreprocessor(std::istream &istr, const unsigned int bom);
/** should __cplusplus be defined? */
static bool cplusplus(const Settings *settings, const std::string &filename);