diff options
author | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 07:17:46 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2013-03-05 07:17:46 +0400 |
commit | f44b54d2a7866033025bd4e99992a72e3a27c428 (patch) | |
tree | e8c15aac4a82b206adf2d551fcc626592f23cd64 /source/blender/editors | |
parent | 47c1570e6839e3684bfe4b0c78a3404e5bb72184 (diff) |
patch [#34103]
from Lawrence D'Oliveiro (ldo)
More use of bool type, necessitating adding inclusion of BLI_utildefines.h, or moving it up in the inclusion order if it was already included, in various places
- storage.c: make some variables only used in bli_builddir local to that
- storage.c: BLI_file_descriptor_size should allow 0 as a valid file descriptor
- path_util.c: make pointers to non-reentrant storage returned from folder routines const, necessitating making variables holding these returned pointers const elsewhere as well
- path_util.c: BLI_string_to_utf8 closes iconv context in case of conversion error
- blf_lang.c: fill_locales routine now has its own "languages" local variable to construct paths (was stealing internal storage belonging to BLI_get_folder before)
Diffstat (limited to 'source/blender/editors')
-rw-r--r-- | source/blender/editors/render/render_preview.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/space_file.c | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/editors/render/render_preview.c b/source/blender/editors/render/render_preview.c index 3bf09cbbac1..2a87375dc65 100644 --- a/source/blender/editors/render/render_preview.c +++ b/source/blender/editors/render/render_preview.c @@ -110,7 +110,7 @@ ImBuf *get_brush_icon(Brush *brush) static const int flags = IB_rect | IB_multilayer | IB_metadata; char path[FILE_MAX]; - char *folder; + const char *folder; if (!(brush->icon_imbuf)) { if (brush->flag & BRUSH_CUSTOM_ICON) { diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 3c6f6358171..55d0f49912a 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -583,7 +583,7 @@ void file_change_dir(bContext *C, int checkdir) ED_fileselect_clear(C, sfile); - if (checkdir && BLI_is_dir(sfile->params->dir) == 0) { + if (checkdir && !BLI_is_dir(sfile->params->dir)) { BLI_strncpy(sfile->params->dir, filelist_dir(sfile->files), sizeof(sfile->params->dir)); /* could return but just refresh the current dir */ } diff --git a/source/blender/editors/space_file/space_file.c b/source/blender/editors/space_file/space_file.c index 0a4b922bb38..3d63699d5e4 100644 --- a/source/blender/editors/space_file/space_file.c +++ b/source/blender/editors/space_file/space_file.c @@ -629,7 +629,7 @@ void ED_spacetype_file(void) void ED_file_init(void) { - char *cfgdir = BLI_get_folder(BLENDER_USER_CONFIG, NULL); + const char * const cfgdir = BLI_get_folder(BLENDER_USER_CONFIG, NULL); fsmenu_read_system(fsmenu_get(), TRUE); |