mirror of
https://github.com/libretro/RetroArch.git
synced 2024-11-27 02:00:41 +00:00
(com-parser) Use STRLEN_CONST
This commit is contained in:
parent
7517ea081a
commit
12012b5041
@ -99,7 +99,7 @@ else
|
||||
endif
|
||||
endif
|
||||
|
||||
INCLUDE_DIRS += -I. -I../../deps/peglib
|
||||
INCLUDE_DIRS += -I. -I../../deps/peglib -I../../libretro-common/include
|
||||
|
||||
$(info os : $(OS))
|
||||
$(info host : $(ARCH))
|
||||
|
@ -18,6 +18,7 @@
|
||||
#include <fstream>
|
||||
#include <sstream>
|
||||
#include <cstring>
|
||||
#include <string/stdstring.h>
|
||||
|
||||
using namespace peg;
|
||||
using namespace std;
|
||||
@ -198,7 +199,7 @@ string insert_name(const string& fname, const string& name)
|
||||
{
|
||||
if(name.length() == 2 && name[1] == 'S')
|
||||
{
|
||||
if(!strncmp(fname.c_str() + action.length(), "Shader", strlen("Shader")))
|
||||
if(!strncmp(fname.c_str() + action.length(), "Shader", STRLEN_CONST("Shader")))
|
||||
return action + name[0] + (fname.c_str() + action.length());
|
||||
else
|
||||
return action + name[0] + "Shader" + (fname.c_str() + action.length());
|
||||
@ -588,7 +589,8 @@ public:
|
||||
char* str = line;
|
||||
while (*str && ::isspace(*str))
|
||||
str++;
|
||||
if (*str && !strncmp(str, "typedef struct ", strlen("typedef struct ")))
|
||||
if (*str && !strncmp(str, "typedef struct ",
|
||||
STRLEN_CONST("typedef struct ")))
|
||||
{
|
||||
if(*str && strstr(str, "Vtbl"))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user