Unify checks for missing COM_Parse() token

This commit is contained in:
Zack Middleton committed 2017-06-07 19:16:05 -05:00
1 parent d58234a6c7
commit 1048073e26
4 files changed
+15 -15

No files matched your search

+2 -2
View File
@@ -1417,7 +1417,7 @@ qboolean CG_Load_Menu(char **p) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -1464,7 +1464,7 @@ void CG_LoadMenus(const char *menuFile) {
while ( 1 ) {
token = COM_ParseExt( &p, qtrue );
if( !token || token[0] == 0 || token[0] == '}') {
if (!token[0]) {
break;
}
+5 -5
View File
@@ -566,7 +566,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
voiceChats[i].id[0] = 0;
}
token = COM_ParseExt(p, qtrue);
if (!token || token[0] == 0) {
if (!token[0]) {
return qtrue;
}
if (!Q_stricmp(token, "female")) {
@@ -586,7 +586,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
voiceChatList->numVoiceChats = 0;
while ( 1 ) {
token = COM_ParseExt(p, qtrue);
if (!token || token[0] == 0) {
if (!token[0]) {
return qtrue;
}
Com_sprintf(voiceChats[voiceChatList->numVoiceChats].id, sizeof( voiceChats[voiceChatList->numVoiceChats].id ), "%s", token);
@@ -598,7 +598,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
voiceChats[voiceChatList->numVoiceChats].numSounds = 0;
while(1) {
token = COM_ParseExt(p, qtrue);
if (!token || token[0] == 0) {
if (!token[0]) {
return qtrue;
}
if (!Q_stricmp(token, "}"))
@@ -606,7 +606,7 @@ int CG_ParseVoiceChats( const char *filename, voiceChatList_t *voiceChatList, in
sound = trap_S_RegisterSound( token, compress );
voiceChats[voiceChatList->numVoiceChats].sounds[voiceChats[voiceChatList->numVoiceChats].numSounds] = sound;
token = COM_ParseExt(p, qtrue);
if (!token || token[0] == 0) {
if (!token[0]) {
return qtrue;
}
Com_sprintf(voiceChats[voiceChatList->numVoiceChats].chats[
@@ -674,7 +674,7 @@ int CG_HeadModelVoiceChats( char *filename ) {
p = &ptr;
token = COM_ParseExt(p, qtrue);
if (!token || token[0] == 0) {
if ( !token[0] ) {
return -1;
}
+1 -1
View File
@@ -119,7 +119,7 @@ static int GametypeBits( char *string ) {
p = string;
while( 1 ) {
token = COM_ParseExt( &p, qfalse );
if( token[0] == 0 ) {
if ( !token[0] ) {
break;
}
+7 -7
View File
@@ -4549,7 +4549,7 @@ static qboolean Team_Parse(char **p) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -4610,7 +4610,7 @@ static qboolean Character_Parse(char **p) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -4666,7 +4666,7 @@ static qboolean Alias_Parse(char **p) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -4715,7 +4715,7 @@ static void UI_ParseTeamInfo(const char *teamFile) {
while ( 1 ) {
token = COM_ParseExt( &p, qtrue );
if( !token || token[0] == 0 || token[0] == '}') {
if (!token[0] || token[0] == '}') {
break;
}
@@ -4767,7 +4767,7 @@ static qboolean GameType_Parse(char **p, qboolean join) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -4824,7 +4824,7 @@ static qboolean MapList_Parse(char **p) {
return qtrue;
}
if ( !token || token[0] == 0 ) {
if (!token[0]) {
return qfalse;
}
@@ -4885,7 +4885,7 @@ static void UI_ParseGameInfo(const char *teamFile) {
while ( 1 ) {
token = COM_ParseExt( &p, qtrue );
if( !token || token[0] == 0 || token[0] == '}') {
if (!token[0] || token[0] == '}') {
break;
}