Remove trailing whitespace (#3668)

This commit is contained in:
John Vandenberg
2022-07-07 17:18:20 +08:00
committed by GitHub
parent 0af9524e16
commit 0e6e16645c
1330 changed files with 23570 additions and 23571 deletions

View File

@@ -48,13 +48,13 @@ Attributes& Attributes::operator = (const Attributes& attrs)
return *this;
}
bool Attributes::has(const std::string& name) const
{
return _map.find(name) != _map.end();
}
std::string Attributes::getString(const std::string& name) const
{
AttrMap::const_iterator it = _map.find(name);
@@ -64,7 +64,7 @@ std::string Attributes::getString(const std::string& name) const
throw Poco::NotFoundException(name);
}
std::string Attributes::getString(const std::string& name, const std::string& defaultValue) const
{
AttrMap::const_iterator it = _map.find(name);
@@ -84,7 +84,7 @@ int Attributes::getInt(const std::string& name) const
throw Poco::NotFoundException(name);
}
int Attributes::getInt(const std::string& name, int defaultValue) const
{
AttrMap::const_iterator it = _map.find(name);

View File

@@ -88,7 +88,7 @@ const Token* AttributesParser::parseAttribute(const Token* pNext)
const Token* AttributesParser::parseComplexAttribute(const Token* pNext, const std::string& id)
{
poco_assert_dbg (isOperator(pNext, OperatorToken::OP_OPENBRACE));
pNext = next();
std::string oldId(_id);
if (!_id.empty())
@@ -103,7 +103,7 @@ const Token* AttributesParser::parseComplexAttribute(const Token* pNext, const s
pNext = next();
else
throw SyntaxException("bad attribute declaration");
return pNext;
}

View File

@@ -111,13 +111,13 @@ void Function::makeFinal()
_flags |= FN_FINAL;
}
void Function::makeOverride()
{
_flags |= FN_OVERRIDE;
}
void Function::makeNoexcept()
{
_flags |= FN_NOEXCEPT;
@@ -141,7 +141,7 @@ bool Function::isConstructor() const
return name() == nameSpace()->name();
}
bool Function::isDestructor() const
{
return name()[0] == '~';
@@ -201,7 +201,7 @@ std::string Function::signature() const
return signature;
}
bool Function::isVirtual() const
{
if (_flags & FN_VIRTUAL)

View File

@@ -49,7 +49,7 @@ NameSpace::~NameSpace()
void NameSpace::addSymbol(Symbol* pSymbol)
{
poco_check_ptr (pSymbol);
_symbols.insert(SymbolTable::value_type(pSymbol->name(), pSymbol));
}
@@ -65,7 +65,7 @@ void NameSpace::importSymbol(const std::string& fullName)
}
}
void NameSpace::importNameSpace(const std::string& nameSpace)
{
_importedNameSpaces.push_back(nameSpace);
@@ -94,7 +94,7 @@ Symbol* NameSpace::lookup(const std::string& name) const
Symbol* NameSpace::lookup(const std::string& name, std::set<const NameSpace*>& alreadyVisited) const
{
Symbol* pSymbol = 0;
if (name.empty())
return pSymbol;
@@ -103,12 +103,12 @@ Symbol* NameSpace::lookup(const std::string& name, std::set<const NameSpace*>& a
std::string head;
std::string tail;
splitName(name, head, tail);
alreadyVisited.insert(this);
bool currentNSInserted = true;
if (head.empty())
if (head.empty())
{
alreadyVisited.insert(this);
return root()->lookup(tail, alreadyVisited);
@@ -161,13 +161,13 @@ void NameSpace::nameSpaces(SymbolTable& table) const
extract(Symbol::SYM_NAMESPACE, table);
}
void NameSpace::typeDefs(SymbolTable& table) const
{
extract(Symbol::SYM_TYPEDEF, table);
}
void NameSpace::typeAliases(SymbolTable& table) const
{
extract(Symbol::SYM_TYPEALIAS, table);
@@ -179,19 +179,19 @@ void NameSpace::enums(SymbolTable& table) const
extract(Symbol::SYM_ENUM, table);
}
void NameSpace::classes(SymbolTable& table) const
{
extract(Symbol::SYM_STRUCT, table);
}
void NameSpace::functions(SymbolTable& table) const
{
extract(Symbol::SYM_FUNCTION, table);
}
void NameSpace::variables(SymbolTable& table) const
{
extract(Symbol::SYM_VARIABLE, table);
@@ -226,7 +226,7 @@ void NameSpace::splitName(const std::string& name, std::string& head, std::strin
head.assign(name, 0, pos);
pos += 2;
poco_assert (pos < name.length());
tail.assign(name, pos, name.length() - pos);
tail.assign(name, pos, name.length() - pos);
}
else head = name;
}

View File

@@ -62,7 +62,7 @@ void Struct::addBase(const std::string& name, Symbol::Access access, bool isVirt
_bases.push_back(base);
}
Struct::BaseIterator Struct::baseBegin() const
{
return _bases.begin();
@@ -78,7 +78,7 @@ Struct::BaseIterator Struct::baseEnd() const
void Struct::addDerived(Struct* pClass)
{
poco_check_ptr (pClass);
_derived.push_back(pClass);
}

View File

@@ -25,7 +25,7 @@ namespace CppParser {
Tokenizer::Tokenizer(std::istream& istr):
StreamTokenizer(istr)
StreamTokenizer(istr)
{
addToken(new OperatorToken);
addToken(new IdentifierToken);

View File

@@ -195,14 +195,14 @@ std::string Utility::preprocessFile(const std::string& file, const std::string&
newPath += path;
Environment::set("PATH", path);
}
ProcessHandle proc = Process::launch(exec, args);
ProcessHandle proc = Process::launch(exec, args);
int rc = Process::wait(proc);
if (rc != 0)
{
throw Poco::RuntimeException("Failed to process file");
}
return pp.getFileName();
}
@@ -293,7 +293,7 @@ std::string replace(const std::string& input, const std::string& oldToken, const
start = pos + oldToken.length();
}
while (pos != std::string::npos);
return result;
}

View File

@@ -39,10 +39,10 @@ Variable::Variable(const std::string& decl, NameSpace* pNameSpace):
std::size_t pos = decl.rfind(name());
std::string tmp = decl.substr(0, pos);
tmp = Poco::trim(tmp);
pos = tmp.rfind("*");
_isPointer = (pos == (tmp.size()-1));
Poco::replaceInPlace(tmp, "static ", "");
Poco::replaceInPlace(tmp, "mutable ", "");
Poco::replaceInPlace(tmp, "volatile ", "");
@@ -53,7 +53,7 @@ Variable::Variable(const std::string& decl, NameSpace* pNameSpace):
tmp = tmp.substr(6);
if (tmp.find("const\t") == 0)
tmp = tmp.substr(6);
std::size_t rightCut = tmp.size();
while (rightCut > 0 && (tmp[rightCut-1] == '&' || tmp[rightCut-1] == '*' || tmp[rightCut-1] == '\t' || tmp[rightCut-1] == ' '))
--rightCut;