From 94b1e168b2b97b48b81f7a8f64406b0a6f64184e Mon Sep 17 00:00:00 2001 From: "R. Belmont" Date: Wed, 4 Jan 2023 23:29:18 -0500 Subject: Revert "Update BGFX, BX and BIMG (#10750)" (#10787) This reverts commit 5581eaa50a42256242f32569f59ce10d70ddd8c2 due to link failure on macOS. --- 3rdparty/bgfx/examples/common/entry/cmd.cpp | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to '3rdparty/bgfx/examples/common/entry/cmd.cpp') diff --git a/3rdparty/bgfx/examples/common/entry/cmd.cpp b/3rdparty/bgfx/examples/common/entry/cmd.cpp index 51742b8eb89..1e86df2a4dd 100644 --- a/3rdparty/bgfx/examples/common/entry/cmd.cpp +++ b/3rdparty/bgfx/examples/common/entry/cmd.cpp @@ -1,6 +1,6 @@ /* - * Copyright 2010-2022 Branimir Karadzic. All rights reserved. - * License: https://github.com/bkaradzic/bgfx/blob/master/LICENSE + * Copyright 2010-2021 Branimir Karadzic. All rights reserved. + * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ #include @@ -29,24 +29,12 @@ struct CmdContext void add(const char* _name, ConsoleFn _fn, void* _userData) { - const uint32_t cmd = bx::hash(_name, (uint32_t)bx::strLen(_name) ); + uint32_t cmd = bx::hash(_name, (uint32_t)bx::strLen(_name) ); BX_ASSERT(m_lookup.end() == m_lookup.find(cmd), "Command \"%s\" already exist.", _name); - Func fn = { _fn, _userData }; m_lookup.insert(stl::make_pair(cmd, fn) ); } - void remove(const char* _name) - { - const uint32_t cmd = bx::hash(_name, (uint32_t)bx::strLen(_name) ); - - CmdLookup::iterator it = m_lookup.find(cmd); - if (it != m_lookup.end() ) - { - m_lookup.erase(it); - } - } - void exec(const char* _cmd) { for (bx::StringView next(_cmd); !next.isEmpty(); _cmd = next.getPtr() ) @@ -117,11 +105,6 @@ void cmdAdd(const char* _name, ConsoleFn _fn, void* _userData) s_cmdContext->add(_name, _fn, _userData); } -void cmdRemove(const char* _name) -{ - s_cmdContext->remove(_name); -} - void cmdExec(const char* _format, ...) { char tmp[2048]; -- cgit v1.2.3-70-g09d2