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

Method AddCmd

src/engine/client/graphics_threaded.h:871–882  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

869
870 template<typename TName>
871 void AddCmd(
872 TName &Cmd, const std::function<bool()> &FailFunc = [] { return true; })
873 {
874 if(m_pCommandBuffer->AddCommandUnsafe(Cmd))
875 return;
876
877 // kick command buffer and try again
878 KickCommandBuffer();
879
880 dbg_assert(FailFunc(), "graphics: failed to run fail handler for command '%s'", typeid(TName).name());
881 dbg_assert(m_pCommandBuffer->AddCommandUnsafe(Cmd), "graphics: failed to add command '%s' to command buffer", typeid(TName).name());
882 }
883
884 void KickCommandBuffer();
885

Callers

nothing calls this directly

Calls 1

AddCommandUnsafeMethod · 0.80

Tested by

no test coverage detected