diff options
author | 2018-12-05 19:45:08 +0100 | |
---|---|---|
committer | 2018-12-05 19:45:08 +0100 | |
commit | 0bd02131b644b61088789f52f31b750c9aecaa6d (patch) | |
tree | 811c679a1bba8b24fc7967cdfe73640254d64156 /3rdparty/bgfx/examples/common/entry/cmd.cpp | |
parent | 9a81ec7eaf00d73a23db5c003dc45b55d4b76c4a (diff) |
3rdparty: Updated bgfx, bimg, and bx to latest upstream. [Ryan Holtz]
Diffstat (limited to '3rdparty/bgfx/examples/common/entry/cmd.cpp')
-rw-r--r-- | 3rdparty/bgfx/examples/common/entry/cmd.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/3rdparty/bgfx/examples/common/entry/cmd.cpp b/3rdparty/bgfx/examples/common/entry/cmd.cpp index 08fe6b27501..4c68be9b51c 100644 --- a/3rdparty/bgfx/examples/common/entry/cmd.cpp +++ b/3rdparty/bgfx/examples/common/entry/cmd.cpp @@ -1,5 +1,5 @@ /* - * Copyright 2010-2017 Branimir Karadzic. All rights reserved. + * Copyright 2010-2018 Branimir Karadzic. All rights reserved. * License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause */ @@ -37,7 +37,7 @@ struct CmdContext void exec(const char* _cmd) { - for (const char* next = _cmd; '\0' != *next; _cmd = next) + for (bx::StringView next(_cmd); !next.isEmpty(); _cmd = next.getPtr() ) { char commandLine[1024]; uint32_t size = sizeof(commandLine); @@ -62,14 +62,14 @@ struct CmdContext case -1: { - stl::string tmp(_cmd, next-_cmd - (*next == '\0' ? 0 : 1) ); + stl::string tmp(_cmd, next.getPtr()-_cmd - (next.isEmpty() ? 0 : 1) ); DBG("Command '%s' doesn't exist.", tmp.c_str() ); } break; default: { - stl::string tmp(_cmd, next-_cmd - (*next == '\0' ? 0 : 1) ); + stl::string tmp(_cmd, next.getPtr()-_cmd - (next.isEmpty() ? 0 : 1) ); DBG("Failed '%s' err: %d.", tmp.c_str(), err); } break; |