Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCampbell Barton <ideasman42@gmail.com>2014-01-16 12:15:53 +0400
committerCampbell Barton <ideasman42@gmail.com>2014-01-16 12:15:53 +0400
commitaf93ebcb503293e382f74c2d33554504269d4815 (patch)
treee4490d7be44e3532e1655f82c7a7aeb11cc5785c /source/blender/editors/space_file
parentbb1a7e4d8722fda09a3294eea56a537b6f043dd3 (diff)
Code Cleanup: style and redundant casts
Diffstat (limited to 'source/blender/editors/space_file')
-rw-r--r--source/blender/editors/space_file/file_panels.c4
-rw-r--r--source/blender/editors/space_file/filelist.c24
2 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/editors/space_file/file_panels.c b/source/blender/editors/space_file/file_panels.c
index 1809c6cb835..77cea89f2f7 100644
--- a/source/blender/editors/space_file/file_panels.c
+++ b/source/blender/editors/space_file/file_panels.c
@@ -139,7 +139,7 @@ static void file_panel_system_bookmarks(const bContext *C, Panel *pa)
{
SpaceFile *sfile = CTX_wm_space_file(C);
- if (sfile && !(U.uiflag & USER_HIDE_SYSTEM_BOOKMARKS) ) {
+ if (sfile && !(U.uiflag & USER_HIDE_SYSTEM_BOOKMARKS)) {
file_panel_category(C, pa, FS_CATEGORY_SYSTEM_BOOKMARKS, &sfile->systemnr, ICON_BOOKMARKS, 0);
}
@@ -165,7 +165,7 @@ static void file_panel_recent(const bContext *C, Panel *pa)
uiLayout *row;
if (sfile) {
- if (!(U.uiflag & USER_HIDE_RECENT) ) {
+ if (!(U.uiflag & USER_HIDE_RECENT)) {
row = uiLayoutRow(pa->layout, FALSE);
uiItemO(row, IFACE_("Reset"), ICON_X, "file.reset_recent");
uiItemL(row, NULL, ICON_NONE);
diff --git a/source/blender/editors/space_file/filelist.c b/source/blender/editors/space_file/filelist.c
index 872960432d9..748a0bd884c 100644
--- a/source/blender/editors/space_file/filelist.c
+++ b/source/blender/editors/space_file/filelist.c
@@ -304,18 +304,18 @@ static int is_hidden_file(const char *filename, short hide_dot)
if (filename[0] == '.' && filename[1] != '.' && filename[1] != 0) {
is_hidden = 1; /* ignore .file */
}
- else if (((filename[0] == '.') && (filename[1] == 0) )) {
+ else if (((filename[0] == '.') && (filename[1] == 0))) {
is_hidden = 1; /* ignore . */
}
else {
int len = strlen(filename);
- if ( (len > 0) && (filename[len - 1] == '~') ) {
+ if ((len > 0) && (filename[len - 1] == '~')) {
is_hidden = 1; /* ignore file~ */
}
}
}
else {
- if (((filename[0] == '.') && (filename[1] == 0) )) {
+ if (((filename[0] == '.') && (filename[1] == 0))) {
is_hidden = 1; /* ignore . */
}
}
@@ -370,7 +370,7 @@ void filelist_filter(FileList *filelist)
/* How many files are left after filter ? */
for (i = 0; i < filelist->numfiles; ++i) {
struct direntry *file = &filelist->filelist[i];
- if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) {
+ if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot)) {
num_filtered++;
}
}
@@ -384,7 +384,7 @@ void filelist_filter(FileList *filelist)
for (i = 0, j = 0; i < filelist->numfiles; ++i) {
struct direntry *file = &filelist->filelist[i];
- if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot) ) {
+ if (filelist->filterf(file, filelist->dir, filelist->filter, filelist->hide_dot)) {
filelist->fidx[j++] = i;
}
}
@@ -629,7 +629,7 @@ ImBuf *filelist_getimage(struct FileList *filelist, int index)
BLI_assert(G.background == FALSE);
- if ( (index < 0) || (index >= filelist->numfiltered) ) {
+ if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
}
fidx = filelist->fidx[index];
@@ -646,7 +646,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
BLI_assert(G.background == FALSE);
- if ( (index < 0) || (index >= filelist->numfiltered) ) {
+ if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
}
fidx = filelist->fidx[index];
@@ -669,7 +669,7 @@ ImBuf *filelist_geticon(struct FileList *filelist, int index)
if (file->flags & BLENDERFILE) {
ibuf = gSpecialFileImages[SPECIAL_IMG_BLENDFILE];
}
- else if ( (file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON) ) {
+ else if ((file->flags & MOVIEFILE) || (file->flags & MOVIEFILE_ICON)) {
ibuf = gSpecialFileImages[SPECIAL_IMG_MOVIEFILE];
}
else if (file->flags & SOUNDFILE) {
@@ -698,7 +698,7 @@ struct direntry *filelist_file(struct FileList *filelist, int index)
{
int fidx = 0;
- if ( (index < 0) || (index >= filelist->numfiltered) ) {
+ if ((index < 0) || (index >= filelist->numfiltered)) {
return NULL;
}
fidx = filelist->fidx[index];
@@ -994,7 +994,7 @@ void filelist_select_file(struct FileList *filelist, int index, FileSelType sele
void filelist_select(struct FileList *filelist, FileSelection *sel, FileSelType select, unsigned int flag, FileCheckType check)
{
/* select all valid files between first and last indicated */
- if ( (sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered) ) {
+ if ((sel->first >= 0) && (sel->first < filelist->numfiltered) && (sel->last >= 0) && (sel->last < filelist->numfiltered)) {
int current_file;
for (current_file = sel->first; current_file <= sel->last; current_file++) {
filelist_select_file(filelist, current_file, select, flag, check);
@@ -1332,7 +1332,7 @@ static void thumbnails_startjob(void *tjv, short *stop, short *do_update, float
tj->stop = stop;
tj->do_update = do_update;
- while ( (*stop == 0) && (limg) ) {
+ while ((*stop == 0) && (limg)) {
if (limg->flags & IMAGEFILE) {
limg->img = IMB_thumb_manage(limg->path, THB_NORMAL, THB_SOURCE_IMAGE);
}
@@ -1393,7 +1393,7 @@ void thumbnails_start(FileList *filelist, const bContext *C)
tj->filelist = filelist;
for (idx = 0; idx < filelist->numfiles; idx++) {
if (!filelist->filelist[idx].image) {
- if ( (filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE | BLENDERFILE_BACKUP)) ) {
+ if ((filelist->filelist[idx].flags & (IMAGEFILE | MOVIEFILE | BLENDERFILE | BLENDERFILE_BACKUP))) {
FileImage *limg = MEM_callocN(sizeof(FileImage), "loadimage");
BLI_strncpy(limg->path, filelist->filelist[idx].path, FILE_MAX);
limg->index = idx;