Mark SymbolTable::maxID() as const and nodiscard

master
Sébastien Villemot 2023-12-01 14:17:12 +01:00
parent 7e6abc97c4
commit b8c521be31
No known key found for this signature in database
GPG Key ID: 2CECE9350ECEBE4A
1 changed files with 2 additions and 2 deletions

View File

@ -363,7 +363,7 @@ public:
//! Get number of parameters
[[nodiscard]] inline int param_nbr() const noexcept(false);
//! 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)
[[nodiscard]] inline int orig_endo_nbr() const noexcept(false);
//! Write output of this class
@ -540,7 +540,7 @@ SymbolTable::param_nbr() const noexcept(false)
}
inline int
SymbolTable::maxID()
SymbolTable::maxID() const
{
return symbol_table.size() - 1;
}