MCPcopy Create free account
hub / github.com/JACoders/OpenJK / GetIDForString

Function GetIDForString

code/qcommon/q_shared.cpp:991–1004  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

989*/
990
991int GetIDForString ( const stringID_table_t *table, const char *string )
992{
993 int index = 0;
994
995 while ( VALIDSTRING( table[index].name ) )
996 {
997 if ( !Q_stricmp( table[index].name, string ) )
998 return table[index].id;
999
1000 index++;
1001 }
1002
1003 return -1;
1004}
1005
1006/*
1007-------------------------

Callers 15

Q3_SetObjectiveFunction · 0.50
Q3_SetMissionFailedFunction · 0.50
Q3_SetStatusTextFunction · 0.50
Q3_SetAnimUpperFunction · 0.50
Q3_SetAnimLowerFunction · 0.50
Q3_SetPlayerTeamFunction · 0.50
Q3_SetEnemyTeamFunction · 0.50
Q3_SetBStateFunction · 0.50
Q3_SetTempBStateFunction · 0.50
Q3_SetDefaultBStateFunction · 0.50
Q3_SetWeaponFunction · 0.50
Q3_SetItemFunction · 0.50

Calls 2

VALIDSTRINGFunction · 0.85
Q_stricmpFunction · 0.85

Tested by

no test coverage detected