mirror of https://github.com/AxioDL/metaforce.git
Console: Make commandExists() a const qualified member function
This doesn't modify internal console state, so it can be turned into a const qualified member function.
This commit is contained in:
parent
deb09550d3
commit
c8eab43489
|
@ -89,7 +89,7 @@ public:
|
|||
|
||||
void help(Console* con, const std::vector<std::string>& args);
|
||||
void listCommands(Console* con, const std::vector<std::string>& args);
|
||||
bool commandExists(std::string_view cmd);
|
||||
bool commandExists(std::string_view cmd) const;
|
||||
|
||||
void vreport(Level level, fmt::string_view format, fmt::format_args args);
|
||||
template <typename S, typename... Args, typename Char = fmt::char_t<S>>
|
||||
|
|
|
@ -167,7 +167,7 @@ void Console::listCommands(Console* /*con*/, const std::vector<std::string>& /*a
|
|||
report(Level::Info, fmt("'{}': {}"), comPair.second.m_displayName, comPair.second.m_helpString);
|
||||
}
|
||||
|
||||
bool Console::commandExists(std::string_view cmd) {
|
||||
bool Console::commandExists(std::string_view cmd) const {
|
||||
std::string cmdName{cmd};
|
||||
athena::utility::tolower(cmdName);
|
||||
|
||||
|
|
Loading…
Reference in New Issue