summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/examples/common/entry/cmd.cpp
diff options
context:
space:
mode:
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;