[Bf-blender-cvs] [3dcc05c] master: Cleanup: no need to cast for pointer comparison
Campbell Barton
noreply at git.blender.org
Tue May 3 10:16:07 CEST 2016
Commit: 3dcc05c591ddda768d0870025be70ccd299f3df3
Author: Campbell Barton
Date: Tue May 3 18:16:06 2016 +1000
Branches: master
https://developer.blender.org/rB3dcc05c591ddda768d0870025be70ccd299f3df3
Cleanup: no need to cast for pointer comparison
===================================================================
M source/blender/blenlib/intern/path_util.c
===================================================================
diff --git a/source/blender/blenlib/intern/path_util.c b/source/blender/blenlib/intern/path_util.c
index fadfb64..2b79384 100644
--- a/source/blender/blenlib/intern/path_util.c
+++ b/source/blender/blenlib/intern/path_util.c
@@ -1927,8 +1927,7 @@ const char *BLI_first_slash(const char *string)
if (!ffslash) return fbslash;
else if (!fbslash) return ffslash;
- if ((intptr_t)ffslash < (intptr_t)fbslash) return ffslash;
- else return fbslash;
+ return (ffslash < fbslash) ? ffslash : fbslash;
}
/**
@@ -1942,8 +1941,7 @@ const char *BLI_last_slash(const char *string)
if (!lfslash) return lbslash;
else if (!lbslash) return lfslash;
- if ((intptr_t)lfslash < (intptr_t)lbslash) return lbslash;
- else return lfslash;
+ return (lfslash > lbslash) ? lfslash : lbslash;
}
/**
More information about the Bf-blender-cvs
mailing list