From 11b260ee065db2510d5dbf315bed9be0a7bed02b Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Sat, 20 Mar 2010 16:56:52 +0000 Subject: [PATCH] warning fix --- source/blender/blenloader/BLO_readfile.h | 2 +- source/blender/blenloader/intern/readfile.c | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/source/blender/blenloader/BLO_readfile.h b/source/blender/blenloader/BLO_readfile.h index 811b7e88f82..df7cd25a6db 100644 --- a/source/blender/blenloader/BLO_readfile.h +++ b/source/blender/blenloader/BLO_readfile.h @@ -205,7 +205,7 @@ int BLO_has_bfile_extension(char *str); /* return ok when a blenderfile, in dir is the filename, * in group the type of libdata */ -int BLO_is_a_library(char *path, char *dir, char *group); +int BLO_is_a_library(const char *path, char *dir, char *group); struct Main* BLO_library_append_begin(const struct bContext *C, BlendHandle** bh, char *dir); void BLO_library_append_named_part(const struct bContext *C, struct Main *mainl, BlendHandle** bh, char *name, int idcode, short flag); diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 747920e68ce..1fbf6e93617 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -1070,7 +1070,7 @@ int BLO_has_bfile_extension(char *str) return (BLI_testextensie(str, ".ble") || BLI_testextensie(str, ".blend")||BLI_testextensie(str, ".blend.gz")); } -int BLO_is_a_library(char *path, char *dir, char *group) +int BLO_is_a_library(const char *path, char *dir, char *group) { /* return ok when a blenderfile, in dir is the filename, * in group the type of libdata @@ -1087,7 +1087,7 @@ int BLO_is_a_library(char *path, char *dir, char *group) dir[len-1]= 0; /* Find the last slash */ - fd= (strrchr(dir, '/')>strrchr(dir, '\\'))?strrchr(dir, '/'):strrchr(dir, '\\'); + fd= BLI_last_slash(dir); if(fd==0) return 0; *fd= 0; @@ -1099,7 +1099,7 @@ int BLO_is_a_library(char *path, char *dir, char *group) char *gp = fd+1; // in case we have a .blend file, gp points to the group /* Find the last slash */ - fd= (strrchr(dir, '/')>strrchr(dir, '\\'))?strrchr(dir, '/'):strrchr(dir, '\\'); + fd= BLI_last_slash(dir); if (!fd || !BLO_has_bfile_extension(fd+1)) return 0; /* now we know that we are in a blend file and it is safe to