MCPcopy Create free account
hub / github.com/ddnet/ddnet / GetCommandInfo

Method GetCommandInfo

src/engine/shared/console.cpp:1102–1114  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1100}
1101
1102const IConsole::ICommandInfo *CConsole::GetCommandInfo(const char *pName, int FlagMask, bool Temp)
1103{
1104 for(CCommand *pCommand = m_pFirstCommand; pCommand; pCommand = pCommand->Next())
1105 {
1106 if(pCommand->m_Flags & FlagMask && pCommand->m_Temp == Temp)
1107 {
1108 if(str_comp_nocase(pCommand->Name(), pName) == 0)
1109 return pCommand;
1110 }
1111 }
1112
1113 return nullptr;
1114}
1115
1116std::unique_ptr<IConsole> CreateConsole(int FlagMask) { return std::make_unique<CConsole>(FlagMask); }
1117

Callers 4

OnInputMethod · 0.80
ConHelpMethod · 0.80

Calls 3

str_comp_nocaseFunction · 0.85
NextMethod · 0.45
NameMethod · 0.45

Tested by

no test coverage detected