Skip to content
Snippets Groups Projects
Verified Commit b8c521be authored by Sébastien Villemot's avatar Sébastien Villemot
Browse files

Mark SymbolTable::maxID() as const and nodiscard

parent 7e6abc97
No related branches found
No related tags found
No related merge requests found
...@@ -363,7 +363,7 @@ public: ...@@ -363,7 +363,7 @@ public:
//! Get number of parameters //! Get number of parameters
[[nodiscard]] inline int param_nbr() const noexcept(false); [[nodiscard]] inline int param_nbr() const noexcept(false);
//! Returns the greatest symbol ID (the smallest is zero) //! Returns the greatest symbol ID (the smallest is zero)
inline int maxID(); [[nodiscard]] inline int maxID() const;
//! Get number of user-declared endogenous variables (without the auxiliary variables) //! Get number of user-declared endogenous variables (without the auxiliary variables)
[[nodiscard]] inline int orig_endo_nbr() const noexcept(false); [[nodiscard]] inline int orig_endo_nbr() const noexcept(false);
//! Write output of this class //! Write output of this class
...@@ -540,7 +540,7 @@ SymbolTable::param_nbr() const noexcept(false) ...@@ -540,7 +540,7 @@ SymbolTable::param_nbr() const noexcept(false)
} }
inline int inline int
SymbolTable::maxID() SymbolTable::maxID() const
{ {
return symbol_table.size() - 1; return symbol_table.size() - 1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment