Token::printOut(): don't write title if it's empty

This commit is contained in:
Daniel Marjamäki 2013-08-18 09:01:03 +02:00
parent 865ff82425
commit ed890a23a8
1 changed files with 2 additions and 2 deletions

View File

@ -969,14 +969,14 @@ void Token::createMutualLinks(Token *begin, Token *end)
void Token::printOut(const char *title) const void Token::printOut(const char *title) const
{ {
if (title) if (title && title[0])
std::cout << "\n### " << title << " ###\n"; std::cout << "\n### " << title << " ###\n";
std::cout << stringifyList(true, true, true, true, true, 0, 0) << std::endl; std::cout << stringifyList(true, true, true, true, true, 0, 0) << std::endl;
} }
void Token::printOut(const char *title, const std::vector<std::string> &fileNames) const void Token::printOut(const char *title, const std::vector<std::string> &fileNames) const
{ {
if (title) if (title && title[0])
std::cout << "\n### " << title << " ###\n"; std::cout << "\n### " << title << " ###\n";
std::cout << stringifyList(true, true, true, true, true, &fileNames, 0) << std::endl; std::cout << stringifyList(true, true, true, true, true, &fileNames, 0) << std::endl;
} }