MCPcopy Create free account
hub / github.com/NVIDIA-RTX/Donut / UnregisterCommand

Method UnregisterCommand

src/engine/ConsoleObjects.cpp:151–167  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

149 }
150
151 bool UnregisterCommand(std::string_view name)
152 {
153 std::lock_guard<std::mutex> lock(m_Mutex);
154 if (auto it = m_Dictionary.find(name); it != m_Dictionary.end())
155 {
156 if (it->second->AsCommand())
157 {
158 m_Dictionary.erase(it);
159 return true;
160 }
161 else
162 donut::log::error("unregister command '%s'; object is not a console command");
163 }
164 else
165 donut::log::error("unregister command '%s'; command does not exist", name);
166 return false;
167 }
168
169 template <typename T> Object* RegisterVariable(char const* name, char const* description, T const& value, VariableState state)
170 {

Callers 1

UnregisterCommandFunction · 0.80

Calls 3

errorFunction · 0.85
endMethod · 0.45
AsCommandMethod · 0.45

Tested by

no test coverage detected