diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 20:52:21 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-01-27 21:00:04 +0400 |
commit | a5c35fb27f090bb716a3bb49a69a56be80dff6d3 (patch) | |
tree | c2486c0781d2135c00ee58c78c042ba9d4f87b97 /source/blender/editors/space_file/filesel.c | |
parent | 60287e23b53a273aae56c42502278991dbeee9e7 (diff) |
Code cleanup: use booleans where appropriate
Diffstat (limited to 'source/blender/editors/space_file/filesel.c')
-rw-r--r-- | source/blender/editors/space_file/filesel.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_file/filesel.c b/source/blender/editors/space_file/filesel.c index d329d505138..e00d0f34dd9 100644 --- a/source/blender/editors/space_file/filesel.c +++ b/source/blender/editors/space_file/filesel.c @@ -111,11 +111,11 @@ short ED_fileselect_set_params(SpaceFile *sfile) /* set the parameters from the operator, if it exists */ if (op) { PropertyRNA *prop; - const short is_files = (RNA_struct_find_property(op->ptr, "files") != NULL); - const short is_filepath = (RNA_struct_find_property(op->ptr, "filepath") != NULL); - const short is_filename = (RNA_struct_find_property(op->ptr, "filename") != NULL); - const short is_directory = (RNA_struct_find_property(op->ptr, "directory") != NULL); - const short is_relative_path = (RNA_struct_find_property(op->ptr, "relative_path") != NULL); + const bool is_files = (RNA_struct_find_property(op->ptr, "files") != NULL); + const bool is_filepath = (RNA_struct_find_property(op->ptr, "filepath") != NULL); + const bool is_filename = (RNA_struct_find_property(op->ptr, "filename") != NULL); + const bool is_directory = (RNA_struct_find_property(op->ptr, "directory") != NULL); + const bool is_relative_path = (RNA_struct_find_property(op->ptr, "relative_path") != NULL); BLI_strncpy_utf8(params->title, RNA_struct_ui_name(op->type->srna), sizeof(params->title)); @@ -296,9 +296,9 @@ int ED_fileselect_layout_numfiles(FileLayout *layout, ARegion *ar) } } -static int is_inside(int x, int y, int cols, int rows) +static bool is_inside(int x, int y, int cols, int rows) { - return ( (x >= 0) && (x < cols) && (y >= 0) && (y < rows) ); + return ((x >= 0) && (x < cols) && (y >= 0) && (y < rows)); } FileSelection ED_fileselect_layout_offset_rect(FileLayout *layout, const rcti *rect) |