[Bf-blender-cvs] [f979115] master: Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-positive assert).
Bastien Montagne
noreply at git.blender.org
Thu Aug 20 12:45:35 CEST 2015
Commit: f9791155e4821d235e864be40a9c39d58e7e5f8a
Author: Bastien Montagne
Date: Thu Aug 20 12:44:03 2015 +0200
Branches: master
https://developer.blender.org/rBf9791155e4821d235e864be40a9c39d58e7e5f8a
Minor cleanup (BLI_cleanup_dir already adds trailing slash, and correct a false-positive assert).
===================================================================
M source/blender/editors/space_file/filelist.c
===================================================================
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 0945e52..c9133e8 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -1366,13 +1366,9 @@ const char *filelist_dir(struct FileList *filelist)
*/
void filelist_setdir(struct FileList *filelist, char *r_dir)
{
-#ifndef NDEBUG
- size_t len = strlen(r_dir);
- BLI_assert((len < FILE_MAX_LIBEXTRA) && ELEM(r_dir[len - 1], SEP, ALTSEP));
-#endif
+ BLI_assert(strlen(r_dir) < FILE_MAX_LIBEXTRA);
BLI_cleanup_dir(G.main->name, r_dir);
- BLI_add_slash(r_dir);
filelist->checkdirf(filelist, r_dir);
if (!STREQ(filelist->filelist.root, r_dir)) {
More information about the Bf-blender-cvs
mailing list