MCPcopy Create free account
hub / github.com/GlobedGD/globed2 / assertNotAdded

Function assertNotAdded

include/globed/core/Module.hpp:162–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

160 geode::Result<> disableHooks();
161
162 void assertNotAdded(geode::Hook* hook) const {
163 if (std::find(m_hooks.begin(), m_hooks.end(), hook) != m_hooks.end()) {
164 geode::utils::terminate(
165 fmt::format("Globed module {} ({}) by {} tried to claim a hook that was already claimed ({})",
166 this->name(), this->id(), this->author(), hook->getDisplayName()),
167 geode::Mod::get()
168 );
169 }
170 }
171
172 void assertNotAdded(geode::Patch* patch) const {
173 if (std::find(m_patches.begin(), m_patches.end(), patch) != m_patches.end()) {

Callers

nothing calls this directly

Calls 4

getFunction · 0.50
nameMethod · 0.45
idMethod · 0.45
authorMethod · 0.45

Tested by

no test coverage detected