merge fixes from develop

This commit is contained in:
Günter Obiltschnig 2018-12-30 21:16:19 +01:00
parent 19228eedd9
commit b543e074a1
9 changed files with 16 additions and 18 deletions

View File

@ -28,7 +28,7 @@
// from a DLL simpler. All files within this DLL are compiled with the CppParser_EXPORTS
// symbol defined on the command line. this symbol should not be defined on any project
// that uses this DLL. This way any other project whose source files include this file see
// CppParser_API functions as being imported from a DLL, wheras this DLL sees symbols
// CppParser_API functions as being imported from a DLL, whereas this DLL sees symbols
// defined with this macro as being exported.
//
#if (defined(_WIN32) || defined(__CYGWIN__)) && defined(POCO_DLL)

View File

@ -244,7 +244,6 @@ public:
Poco::Token::Class tokenClass() const;
bool start(char c, std::istream& istr);
void finish(std::istream& istr);
int asInteger() const;
double asFloat() const;

View File

@ -64,7 +64,7 @@ public:
Symbol* lookup(const std::string& name) const;
/// Looks up the given name in the symbol table
/// and returns the corresponsing symbol, or null
/// and returns the corresponding symbol, or null
/// if no symbol can be found. The name can include
/// a namespace.
@ -102,7 +102,7 @@ public:
private:
Symbol* lookup(const std::string& name, std::set<const NameSpace*>& alreadyVisited) const;
/// Looks up the given name in the symbol table
/// and returns the corresponsing symbol, or null
/// and returns the corresponding symbol, or null
/// if no symbol can be found. The name can include
/// a namespace.

View File

@ -330,7 +330,7 @@ Token::Class IdentifierToken::tokenClass() const
}
bool IdentifierToken::start(char c, std::istream& istr)
bool IdentifierToken::start(char c, std::istream& /*istr*/)
{
_value = c;
return (c >= 'A' && c <= 'Z') ||
@ -379,7 +379,7 @@ Token::Class StringLiteralToken::tokenClass() const
}
bool StringLiteralToken::start(char c, std::istream& istr)
bool StringLiteralToken::start(char c, std::istream& /*istr*/)
{
_value = c;
return c == '"';
@ -438,7 +438,7 @@ Token::Class CharLiteralToken::tokenClass() const
}
bool CharLiteralToken::start(char c, std::istream& istr)
bool CharLiteralToken::start(char c, std::istream& /*istr*/)
{
_value = c;
return c == '\'';
@ -739,7 +739,7 @@ Token::Class PreprocessorToken::tokenClass() const
}
bool PreprocessorToken::start(char c, std::istream& istr)
bool PreprocessorToken::start(char c, std::istream& /*istr*/)
{
_value = c;
return c == '#';

View File

@ -52,9 +52,9 @@ Function::Function(const std::string& decl, NameSpace* pNameSpace):
_retParam = replace(_retParam, "inline ", "");
if (_flags & FN_TEMPLATE)
{
std::size_t pos = _retParam.find(">");
poco_assert (pos != std::string::npos);
_retParam = _retParam.substr(pos+1);
std::size_t pos2 = _retParam.find(">");
poco_assert (pos2 != std::string::npos);
_retParam = _retParam.substr(pos2+1);
}
Poco::trimInPlace(_retParam);
}
@ -214,7 +214,6 @@ bool Function::isVirtual() const
return pClass && pClass->hasVirtualDestructor();
}
else return getOverridden() != 0;
return false;
}

View File

@ -134,9 +134,9 @@ Symbol* NameSpace::lookup(const std::string& name, std::set<const NameSpace*>& a
pSymbol = lookup(itAlias->second, alreadyVisited);
else
{
for (NameSpaceVec::const_iterator it = _importedNameSpaces.begin(); !pSymbol && it != _importedNameSpaces.end(); ++it)
for (NameSpaceVec::const_iterator itns = _importedNameSpaces.begin(); !pSymbol && itns != _importedNameSpaces.end(); ++itns)
{
Symbol* pNS = lookup(*it, alreadyVisited);
Symbol* pNS = lookup(*itns, alreadyVisited);
if (pNS && pNS->kind() == Symbol::SYM_NAMESPACE)
{
pSymbol = static_cast<NameSpace*>(pNS)->lookup(name, alreadyVisited);

View File

@ -28,7 +28,7 @@ namespace CppParser {
int Parameter::_count(0);
Parameter::Parameter(const std::string& decl, Function* pFunction):
Parameter::Parameter(const std::string& decl, Function* /*pFunction*/):
Decl(handleDecl(decl), 0), // handle init values
_type(),
_isRef(false),

View File

@ -161,7 +161,7 @@ void Parser::parse()
std::string m(exc.message());
std::string where(_currentPath);
where.append("(");
where.append(NumberFormatter::format(_istr.getCurrentLineNumber()));
where.append(NumberFormatter::format(static_cast<int>(_istr.getCurrentLineNumber())));
where.append(")");
throw SyntaxException(m, where);
}
@ -373,7 +373,7 @@ const Token* Parser::parseBaseClassList(const Token* pNext, Struct* pClass)
}
const Token* Parser::parseClassMembers(const Token* pNext, Struct* pClass)
const Token* Parser::parseClassMembers(const Token* pNext, Struct* /*pClass*/)
{
poco_assert (isOperator(pNext, OperatorToken::OP_OPENBRACE));

View File

@ -91,7 +91,7 @@ void Utility::detectPrefixAndIncludes(const std::string& origHFile, std::vector<
++itTmp;
std::string defValue = *itTmp;
istr >> x;
// now find the corresponsing #define
// now find the corresponding #define
while (x.find(defValue) == std::string::npos)
istr >> x;
//now parse until a class def is found without a ; at the end