From f256f0107e3d25f978ddff943df03a99dd33d41f Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Mon, 25 Aug 2014 16:57:24 +0200 Subject: [PATCH] Recognize unknown Doxygen tags correctly. DoxygenParser::commandBelongs() returned the same value (0) for simple commands and unrecognized commands. Fix this by returning a different NONE value for the latter. --- Source/DoxygenTranslator/src/DoxygenParser.cpp | 2 +- Source/DoxygenTranslator/src/DoxygenParser.h | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Source/DoxygenTranslator/src/DoxygenParser.cpp b/Source/DoxygenTranslator/src/DoxygenParser.cpp index ef3997cf7..5b235f91e 100644 --- a/Source/DoxygenTranslator/src/DoxygenParser.cpp +++ b/Source/DoxygenTranslator/src/DoxygenParser.cpp @@ -138,7 +138,7 @@ int DoxygenParser::commandBelongs(const std::string &theCommand) if (it != doxygenCommands.end()) { return it->second; } - return 0; + return NONE; } std::string DoxygenParser::trim(const std::string &text) diff --git a/Source/DoxygenTranslator/src/DoxygenParser.h b/Source/DoxygenTranslator/src/DoxygenParser.h index 06c14de04..0b1212d4b 100644 --- a/Source/DoxygenTranslator/src/DoxygenParser.h +++ b/Source/DoxygenTranslator/src/DoxygenParser.h @@ -22,6 +22,7 @@ class DoxygenParser { private: typedef enum { + NONE = -1, SIMPLECOMMAND, COMMANDWORD, COMMANDLINE,