From 0bd02131b644b61088789f52f31b750c9aecaa6d Mon Sep 17 00:00:00 2001 From: mooglyguy Date: Wed, 5 Dec 2018 19:45:08 +0100 Subject: 3rdparty: Updated bgfx, bimg, and bx to latest upstream. [Ryan Holtz] --- 3rdparty/bgfx/examples/common/entry/cmd.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 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 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; -- cgit v1.2.3-70-g09d2