소스 검색

Minor strcasecmp optimization.

Ryan C. Gordon 23 년 전
부모
커밋
fbbaf19a4f
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. 2 4
      platform/posix.c

+ 2 - 4
platform/posix.c

@@ -131,10 +131,8 @@ int __PHYSFS_platformStricmp(const char *x, const char *y)
     {
         ux = toupper((int) *x);
         uy = toupper((int) *y);
-        if (ux > uy)
-            return(1);
-        else if (ux < uy)
-            return(-1);
+        if (ux != uy)
+            return((ux > uy) ? 1 : -1);
         x++;
         y++;
     } while ((ux) && (uy));