@@ -102,12 +102,12 @@ static void debugDumpPlayerStats( const PSPlayerStats& stats )
102102 DEBUG_LOG ((" gamesAsRandom: %d" , stats.gamesAsRandom ));
103103 }
104104
105- if (stats.options .length ())
105+ if (! stats.options .empty ())
106106 {
107107 DEBUG_LOG ((" Options: %s" , stats.options .c_str ()));
108108 }
109109
110- if (stats.systemSpec .length ())
110+ if (! stats.systemSpec .empty ())
111111 {
112112 DEBUG_LOG ((" systemSpec: %s" , stats.systemSpec .c_str ()));
113113 }
@@ -184,7 +184,7 @@ static void debugDumpPlayerStats( const PSPlayerStats& stats )
184184 DEBUG_LOG ((" lastLadderPort: %d" , stats.lastLadderPort ));
185185 }
186186
187- if (stats.lastLadderHost .length ())
187+ if (! stats.lastLadderHost .empty ())
188188 {
189189 DEBUG_LOG ((" lastLadderHost: %s" , stats.lastLadderHost .c_str ()));
190190 }
@@ -246,12 +246,12 @@ void PSPlayerStats::incorporate( const PSPlayerStats& other )
246246 gamesAsRandom = other.gamesAsRandom ;
247247 }
248248
249- if (other.options .length ())
249+ if (! other.options .empty ())
250250 {
251251 options = other.options ;
252252 }
253253
254- if (other.systemSpec .length ())
254+ if (! other.systemSpec .empty ())
255255 {
256256 systemSpec = other.systemSpec ;
257257 }
@@ -325,7 +325,7 @@ void PSPlayerStats::incorporate( const PSPlayerStats& other )
325325 {
326326 lastLadderPort = other.lastLadderPort ;
327327 }
328- if (other.lastLadderHost .length ())
328+ if (! other.lastLadderHost .empty ())
329329 {
330330 lastLadderHost = other.lastLadderHost ;
331331 }
@@ -971,7 +971,7 @@ void PSThreadClass::Thread_Function()
971971 addedInDesyncs4 + req.addDesync , addedInDiscons4 + req.addDiscon ));
972972 }
973973 pref.write ();
974- if (req.password .size () == 0 )
974+ if (req.password .empty () )
975975 return ;
976976 }
977977 if (!req.player .id )
@@ -1370,13 +1370,13 @@ std::string GameSpyPSMessageQueueInterface::formatPlayerKVPairs( PSPlayerStats s
13701370 s.append (kvbuf);
13711371 }
13721372
1373- if (stats.options .length ())
1373+ if (! stats.options .empty ())
13741374 {
13751375 snprintf (kvbuf, 256 , " \\ options\\ %s" , stats.options .c_str ());
13761376 s.append (kvbuf);
13771377 }
13781378
1379- if (stats.systemSpec .length ())
1379+ if (! stats.systemSpec .empty ())
13801380 {
13811381 snprintf (kvbuf, 256 , " \\ systemSpec\\ %s" , stats.systemSpec .c_str ());
13821382 s.append (kvbuf);
@@ -1472,7 +1472,7 @@ std::string GameSpyPSMessageQueueInterface::formatPlayerKVPairs( PSPlayerStats s
14721472 sprintf (kvbuf, " \\ ladderPort\\ %d" , stats.lastLadderPort );
14731473 s.append (kvbuf);
14741474 }
1475- if (stats.lastLadderHost .length ())
1475+ if (! stats.lastLadderHost .empty ())
14761476 {
14771477 snprintf (kvbuf, 256 , " \\ ladderHost\\ %s" , stats.lastLadderHost .c_str ());
14781478 s.append (kvbuf);
0 commit comments