]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[5014] Only fatal must be static
authorFrancis Dupont <fdupont@isc.org>
Mon, 21 Nov 2016 05:40:39 +0000 (06:40 +0100)
committerFrancis Dupont <fdupont@isc.org>
Mon, 21 Nov 2016 05:40:39 +0000 (06:40 +0100)
src/bin/dhcp6/dhcp6_lexer.ll
src/bin/dhcp6/parser_context.h

index b8605fa8aa4c7bde8fd042778dfdc061d8df2c7b..5bd7f8bcef7d1ab8454df85cb062930fc2cc93f6 100644 (file)
@@ -147,7 +147,7 @@ JSONString                              \"{JSONStringCharacter}*\"
     std::string tmp(yytext+1);
     tmp.resize(tmp.size() - 1);
 
-    Parser6Context::includeFile(tmp);
+    driver.includeFile(tmp);
 }
 <DIR_EXIT>"?>" BEGIN(INITIAL);
     
index 73e3f2d9a90bdd243a846c5b2d0b05db9dfd0866..ed895cd69e3ee841b01f4536a190e2e6d2d4e2f1 100644 (file)
@@ -63,7 +63,7 @@ public:
     void scanFileEnd(FILE * f);
 
     /// @brief Divert input to an include file.
-    static void includeFile(const std::string& filename);
+    void includeFile(const std::string& filename);
 
     /// @brief Run the parser on the string specified.
     ///
@@ -81,17 +81,18 @@ public:
     ///
     /// @param loc location within the parsed file when experienced a problem.
     /// @param what string explaining the nature of the error.
-    static void error(const isc::dhcp::location& loc, const std::string& what);
+    void error(const isc::dhcp::location& loc, const std::string& what);
 
     /// @brief Error handler
     ///
     /// This is a simplified error reporting tool for possible future
     /// cases when the EvalParser is not able to handle the packet.
-    static void error(const std::string& what);
+    void error(const std::string& what);
 
     /// @brief Fatal error handler
     ///
-    /// This is for should not happen but fatal errors
+    /// This is for should not happen but fatal errors.
+    /// Used by YY_FATAL_ERROR macro so required to be static.
     static void fatal(const std::string& what);
 
  private: