summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/cmd.cpp
diff options
context:
space:
mode:
author mooglyguy <therealmogminer@gmail.com>2018-12-05 19:45:08 +0100
committer mooglyguy <therealmogminer@gmail.com>2018-12-05 19:45:08 +0100
commit0bd02131b644b61088789f52f31b750c9aecaa6d (patch)
tree811c679a1bba8b24fc7967cdfe73640254d64156 /3rdparty/bgfx/examples/common/entry/cmd.cpp
parent9a81ec7eaf00d73a23db5c003dc45b55d4b76c4a (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.cpp8
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;