Get rid of findCommand() which duplicaed commandBelongs().
There is no need for two functions for finding the value of a key in the map.
This commit is contained in:
parent
f256f0107e
commit
a7b67a2cac
2 changed files with 1 additions and 17 deletions
|
|
@ -102,17 +102,6 @@ std::string DoxygenParser::stringToLower(const std::string &stringToConvert)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool DoxygenParser::findCommand(const std::string &smallString)
|
|
||||||
{
|
|
||||||
// I'm not sure if we can really do so, because there are different commands
|
|
||||||
// in doxygenCommands and original commandArray
|
|
||||||
|
|
||||||
std::map<std::string, DoxyCommandEnum>::iterator it = doxygenCommands.find(
|
|
||||||
stringToLower(smallString));
|
|
||||||
|
|
||||||
return it != doxygenCommands.end(); // returns true if command was found
|
|
||||||
}
|
|
||||||
|
|
||||||
bool DoxygenParser::isSectionIndicator(const std::string &smallString)
|
bool DoxygenParser::isSectionIndicator(const std::string &smallString)
|
||||||
{
|
{
|
||||||
|
|
||||||
|
|
@ -1021,7 +1010,7 @@ bool DoxygenParser::isStartOfDoxyCommentChar(char c)
|
||||||
bool DoxygenParser::addDoxyCommand(DoxygenParser::TokenList &tokList,
|
bool DoxygenParser::addDoxyCommand(DoxygenParser::TokenList &tokList,
|
||||||
const std::string &cmd)
|
const std::string &cmd)
|
||||||
{
|
{
|
||||||
if (findCommand(cmd)) {
|
if (commandBelongs(cmd) != NONE) {
|
||||||
tokList.push_back(Token(COMMAND, cmd));
|
tokList.push_back(Token(COMMAND, cmd));
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
||||||
|
|
@ -104,11 +104,6 @@ private:
|
||||||
*/
|
*/
|
||||||
std::string stringToLower(const std::string &stringToConvert);
|
std::string stringToLower(const std::string &stringToConvert);
|
||||||
|
|
||||||
/*
|
|
||||||
* Finds out if a command exists (is a possible command)
|
|
||||||
* returns -1 if no match is found
|
|
||||||
*/
|
|
||||||
bool findCommand(const std::string &smallString);
|
|
||||||
/*
|
/*
|
||||||
* isSectionIndicator returns a boolean if the command is a section indicator
|
* isSectionIndicator returns a boolean if the command is a section indicator
|
||||||
* This is a helper method for finding the end of a paragraph
|
* This is a helper method for finding the end of a paragraph
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue