diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:22:49 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-04-26 18:25:15 +0400 |
commit | c67bd49e5607cc3db7446d4b12e1346fc9b2c83a (patch) | |
tree | bffbca1613b3ce8a5e356110c0d35b38dd6537cf /source/blender/editors/space_file | |
parent | f2d25975b5e90f89744be733b81462493dc57977 (diff) |
Code cleanup: use 'const' for arrays (editors)
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r-- | source/blender/editors/space_file/file_panels.c | 2 | ||||
-rw-r--r-- | source/blender/editors/space_file/filelist.c | 6 | ||||
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 4 |
3 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c index cb07db75a91..69789569912 100644 --- a/source/blender/editors/space_file/file_panels.c +++ b/source/blender/editors/space_file/file_panels.c @@ -58,7 +58,7 @@ static void file_panel_cb(bContext *C, void *arg_entry, void *UNUSED(arg_v)) { PointerRNA ptr; - char *entry = (char *)arg_entry; + const char *entry = (char *)arg_entry; WM_operator_properties_create(&ptr, "FILE_OT_select_bookmark"); RNA_string_set(&ptr, "dir", entry); diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c index 15d177011c4..8ef9308e2fd 100644 --- a/source/blender/editors/space_file/filelist.c +++ b/source/blender/editors/space_file/filelist.c @@ -94,8 +94,8 @@ typedef struct FileImage { typedef struct ThumbnailJob { ListBase loadimages; - short *stop; - short *do_update; + const short *stop; + const short *do_update; struct FileList *filelist; ReportList reports; } ThumbnailJob; @@ -1097,7 +1097,7 @@ void filelist_from_library(struct FileList *filelist) filelist->filelist[0].type |= S_IFDIR; for (i = 0, l = names; i < nnames; i++, l = l->next) { - char *blockname = l->link; + const char *blockname = l->link; filelist->filelist[i + 1].relname = BLI_strdup(blockname); if (idcode) { diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index 19947a9ffc9..69888105713 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -396,7 +396,7 @@ float file_shorten_string(char *string, float w, int front) sw = file_string_width(string); if (front == 1) { - char *s = string; + const char *s = string; BLI_strncpy(temp, "...", 4); pad = file_string_width(temp); while ((*s) && (sw + pad > w)) { @@ -412,7 +412,7 @@ float file_shorten_string(char *string, float w, int front) } } else { - char *s = string; + const char *s = string; while (sw > w) { int slen = strlen(string); string[slen - 1] = '\0'; |