Commit: 586a3084677b03e314a906ffdac3560a24058409
Author: Campbell Barton
Date:   Sat Aug 8 11:02:11 2020 +1000
Branches: master
https://developer.blender.org/rB586a3084677b03e314a906ffdac3560a24058409

Cleanup: remove redundant return parenthesis

===================================================================

M       intern/ghost/intern/GHOST_SystemX11.cpp
M       intern/ghost/intern/GHOST_WindowX11.cpp
M       intern/guardedalloc/intern/mallocn_guarded_impl.c
M       source/blender/blenkernel/intern/image.c
M       source/blender/blenkernel/intern/packedFile.c
M       source/blender/blenkernel/intern/softbody.c
M       source/blender/blenlib/intern/storage.c
M       source/blender/blenlib/intern/string.c
M       source/blender/blenloader/intern/readfile.c
M       source/blender/editors/curve/editfont.c
M       source/blender/editors/space_file/filelist.c
M       source/blender/editors/space_outliner/outliner_tree.c
M       source/blender/freestyle/intern/geometry/FitCurve.cpp
M       source/blender/freestyle/intern/geometry/GeomUtils.cpp
M       source/blender/freestyle/intern/view_map/ViewMapAdvancedIterators.h
M       source/blender/imbuf/intern/allocimbuf.c
M       source/blender/imbuf/intern/anim_movie.c
M       source/blender/imbuf/intern/bmp.c
M       source/blender/imbuf/intern/dds/DirectDrawSurface.cpp
M       source/blender/imbuf/intern/dds/Stream.cpp
M       source/blender/imbuf/intern/dds/dds_api.cpp
M       source/blender/imbuf/intern/iris.c
M       source/blender/imbuf/intern/jpeg.c
M       source/blender/imbuf/intern/oiio/openimageio_api.cpp
M       source/blender/imbuf/intern/openexr/openexr_api.cpp
M       source/blender/imbuf/intern/png.c
M       source/blender/imbuf/intern/scaling.c
M       source/blender/imbuf/intern/tiff.c
M       source/blender/imbuf/intern/util.c
M       source/blender/imbuf/intern/writeimage.c
M       source/blender/io/collada/BCAnimationSampler.cpp
M       source/blender/io/collada/collada_utils.h

===================================================================

diff --git a/intern/ghost/intern/GHOST_SystemX11.cpp 
b/intern/ghost/intern/GHOST_SystemX11.cpp
index 74bdff3812e..c0676618101 100644
--- a/intern/ghost/intern/GHOST_SystemX11.cpp
+++ b/intern/ghost/intern/GHOST_SystemX11.cpp
@@ -2169,7 +2169,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool 
selection) const
     }
   }
   else if (owner == None)
-    return (NULL);
+    return NULL;
 
   /* Restore events so copy doesn't swallow other event types 
(keyboard/mouse). */
   vector<XEvent> restore_events;
@@ -2237,7 +2237,7 @@ GHOST_TUns8 *GHOST_SystemX11::getClipboard(bool 
selection) const
 
     return tmp_data;
   }
-  return (NULL);
+  return NULL;
 }
 
 void GHOST_SystemX11::putClipboard(GHOST_TInt8 *buffer, bool selection) const
diff --git a/intern/ghost/intern/GHOST_WindowX11.cpp 
b/intern/ghost/intern/GHOST_WindowX11.cpp
index 691f1790a2d..9a38631adb9 100644
--- a/intern/ghost/intern/GHOST_WindowX11.cpp
+++ b/intern/ghost/intern/GHOST_WindowX11.cpp
@@ -901,7 +901,7 @@ bool GHOST_WindowX11::netwmIsMaximized(void) const
 
   if (prop_ret)
     XFree(prop_ret);
-  return (st);
+  return st;
 }
 
 void GHOST_WindowX11::netwmFullScreen(bool set)
@@ -964,7 +964,7 @@ bool GHOST_WindowX11::netwmIsFullScreen(void) const
 
   if (prop_ret)
     XFree(prop_ret);
-  return (st);
+  return st;
 }
 
 void GHOST_WindowX11::motifFullScreen(bool set)
@@ -1018,7 +1018,7 @@ bool GHOST_WindowX11::motifIsFullScreen(void) const
 
   if (prop_ret)
     XFree(prop_ret);
-  return (state);
+  return state;
 }
 
 GHOST_TWindowState GHOST_WindowX11::getState() const
@@ -1040,7 +1040,7 @@ GHOST_TWindowState GHOST_WindowX11::getState() const
     state_ret = GHOST_kWindowStateFullScreen;
   else if (netwmIsMaximized() == True)
     state_ret = GHOST_kWindowStateMaximized;
-  return (state_ret);
+  return state_ret;
 }
 
 GHOST_TSuccess GHOST_WindowX11::setState(GHOST_TWindowState state)
@@ -1078,7 +1078,7 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
     if (is_motif_full == True)
       motifFullScreen(False);
     icccmSetState(NormalState);
-    return (GHOST_kSuccess);
+    return GHOST_kSuccess;
   }
 
   if (state == GHOST_kWindowStateFullScreen) {
@@ -1087,7 +1087,7 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
      * isn't mapped.
      */
     if (cur_state == GHOST_kWindowStateMinimized)
-      return (GHOST_kFailure);
+      return GHOST_kFailure;
 
     m_normal_state = cur_state;
 
@@ -1097,7 +1097,7 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
       netwmFullScreen(True);
     if (is_motif_full == False)
       motifFullScreen(True);
-    return (GHOST_kSuccess);
+    return GHOST_kSuccess;
   }
 
   if (state == GHOST_kWindowStateMaximized) {
@@ -1106,7 +1106,7 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
      * isn't mapped.
      */
     if (cur_state == GHOST_kWindowStateMinimized)
-      return (GHOST_kFailure);
+      return GHOST_kFailure;
 
     if (is_full == True)
       netwmFullScreen(False);
@@ -1114,7 +1114,7 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
       motifFullScreen(False);
     if (is_max == False)
       netwmMaximized(True);
-    return (GHOST_kSuccess);
+    return GHOST_kSuccess;
   }
 
   if (state == GHOST_kWindowStateMinimized) {
@@ -1123,10 +1123,10 @@ GHOST_TSuccess 
GHOST_WindowX11::setState(GHOST_TWindowState state)
      * the window (maximized, full screen, etc).
      */
     icccmSetState(IconicState);
-    return (GHOST_kSuccess);
+    return GHOST_kSuccess;
   }
 
-  return (GHOST_kFailure);
+  return GHOST_kFailure;
 }
 
 GHOST_TSuccess GHOST_WindowX11::setOrder(GHOST_TWindowOrder order)
diff --git a/intern/guardedalloc/intern/mallocn_guarded_impl.c 
b/intern/guardedalloc/intern/mallocn_guarded_impl.c
index 6024a9919b3..6c08cb3bb62 100644
--- a/intern/guardedalloc/intern/mallocn_guarded_impl.c
+++ b/intern/guardedalloc/intern/mallocn_guarded_impl.c
@@ -1160,7 +1160,7 @@ static const char *check_memlist(MemHead *memh)
     return ("Additional error in header");
   }
 
-  return (name);
+  return name;
 }
 
 size_t MEM_guarded_get_peak_memory(void)
diff --git a/source/blender/blenkernel/intern/image.c 
b/source/blender/blenkernel/intern/image.c
index 4bd966cffc6..7ff34acca7a 100644
--- a/source/blender/blenkernel/intern/image.c
+++ b/source/blender/blenkernel/intern/image.c
@@ -2877,7 +2877,7 @@ int BKE_imbuf_write(ImBuf *ibuf, const char *name, const 
ImageFormatData *imf)
     perror(name);
   }
 
-  return (ok);
+  return ok;
 }
 
 /* same as BKE_imbuf_write() but crappy workaround not to permanently modify
@@ -3005,7 +3005,7 @@ struct anim *openanim(const char *name, int flags, int 
streamindex, char colorsp
   }
   IMB_freeImBuf(ibuf);
 
-  return (anim);
+  return anim;
 }
 
 /* ************************* New Image API *************** */
diff --git a/source/blender/blenkernel/intern/packedFile.c 
b/source/blender/blenkernel/intern/packedFile.c
index 918cb8893ac..6793f5e1169 100644
--- a/source/blender/blenkernel/intern/packedFile.c
+++ b/source/blender/blenkernel/intern/packedFile.c
@@ -80,7 +80,7 @@ int BKE_packedfile_seek(PackedFile *pf, int offset, int 
whence)
     pf->seek = seek;
   }
 
-  return (oldseek);
+  return oldseek;
 }
 
 void BKE_packedfile_rewind(PackedFile *pf)
@@ -108,7 +108,7 @@ int BKE_packedfile_read(PackedFile *pf, void *data, int 
size)
     size = -1;
   }
 
-  return (size);
+  return size;
 }
 
 int BKE_packedfile_count_all(Main *bmain)
@@ -234,7 +234,7 @@ PackedFile *BKE_packedfile_new(ReportList *reports, const 
char *filename, const
 
   // XXX waitcursor(0);
 
-  return (pf);
+  return pf;
 }
 
 /* no libraries for now */
@@ -365,7 +365,7 @@ int BKE_packedfile_write_to_file(ReportList *reports,
   if (guimode) {
   }  // XXX waitcursor(0);
 
-  return (ret_value);
+  return ret_value;
 }
 
 /**
@@ -426,7 +426,7 @@ enum ePF_FileCompare BKE_packedfile_compare_to_file(const 
char *ref_file_name,
     }
   }
 
-  return (ret_val);
+  return ret_val;
 }
 
 /**
@@ -579,7 +579,7 @@ int BKE_packedfile_unpack_vfont(Main *bmain,
     }
   }
 
-  return (ret_value);
+  return ret_value;
 }
 
 int BKE_packedfile_unpack_sound(Main *bmain,
@@ -609,7 +609,7 @@ int BKE_packedfile_unpack_sound(Main *bmain,
     }
   }
 
-  return (ret_value);
+  return ret_value;
 }
 
 int BKE_packedfile_unpack_image(Main *bmain,
@@ -662,7 +662,7 @@ int BKE_packedfile_unpack_image(Main *bmain,
     BKE_image_signal(bmain, ima, NULL, IMA_SIGNAL_RELOAD);
   }
 
-  return (ret_value);
+  return ret_value;
 }
 
 int BKE_packedfile_unpack_volume(Main *bmain,
@@ -692,7 +692,7 @@ int BKE_packedfile_unpack_volume(Main *bmain,
     }
   }
 
-  return (ret_value);
+  return ret_value;
 }
 
 int BKE_packedfile_unpack_all_libraries(Main *bmain, ReportList *reports)
@@ -723,7 +723,7 @@ int BKE_packedfile_unpack_all_libraries(Main *bmain, 
ReportList *reports)
     }
   }
 
-  return (ret_value);
+  return ret_value;
 }
 
 void BKE_packedfile_pack_all_libraries(Main *bmain, ReportList *reports)
diff --git a/source/blender/blenkernel/intern/softbody.c 
b/source/blender/blenkernel/intern/softbody.c
index 1d56db3779a..d38b70a33c8 100644
--- a/source/blender/blenkernel/intern/softbody.c
+++ b/source/blender/blenkernel/intern/softbody.c
@@ -230,7 +230,7 @@ static float _final_goal(Object *ob, BodyPoint *bp) 
/*jow_go_for2_5 */
       }
       f = sb->mingoal + bp->goal * fabsf(sb->maxgoal - sb->mingoal);
       f = pow(f, 4.0f);
-      return (f);
+      return f;
     }
   }
   CLOG_ERROR(&LOG, "sb or bp == NULL");
@@ -1619,7 +1619,7 @@ static int choose_winner(
     case 3:
       copy_v3_v3(w, cc);
   }
-  return (winner);
+  return winner;
 }
 
 static int sb_detect_vertex_collisionCached(float opco[3],
@@ -1833,7 +1833,7 @@ static int sb_deflect_face(Object *ob,
   deflected = sb_detect_vertex_collisionCachedEx(
       s_actpos, facenormal, cf, force, ob, time, vel, intrusion);
 #endif
-  return (deflected);
+  return deflected;
 }
 
 /* hiding this for now .. but the jacobian may pop up on other tasks .. so i'd 
like to keep it */
@@ -1991,13 +1991,13 @@ static int 
_softbody_calc_forces_slice_in_a_thread(Scene *scene,
   }
   else {
     CLOG_ERROR(&LOG, "expected a SB here");
-    return (999);
+    return 999;
   }
 
   /* debugerin */
   if (sb->totpoint < ifirst) {
     printf("Aye 998");
-    return (998);
+    return 998;
   }
   /* debugerin */
 
diff --git a/source/blender/blenlib/intern/storage.c 
b/source/blender/blenlib/intern/storage.c
index fbd9e562b6a..db062ff50fd 100644
--- a/source/blender/blenlib/intern/storage.c
+++ b/source/blender/blenlib/intern/storage.c
@@ -371,13 +371,13 @@ int BLI_exists(const char *name)
 
   free(tmp_16);
   if (res == -1) {
-    return (0);
+    return 0;
   }
 #else
   struct stat st;
   BLI_assert(!BLI_path_is_rel(name));
   if (stat(name, &st)) {
-    return (0);
+    return 0;
   }
 #endif
   return (st.st_mode);
diff --git a/source/blender/blenlib/intern/string.c 
b/source/blender/blenlib/intern/string.c
index 8eeaaa2453a..755637ac274 100644
--- a/source/blender/blenlib/intern/string.c
+++ b/source/blender/blenlib/intern/string.c
@@ -514,7 +514,7 @@ char *BLI_strcasestr(const char *s, const char *find)
     do {
       do {
         if ((sc = *s++) == 0) {
-          return (NULL);
+          return NULL;
         }
         sc = tolower(sc);
       } while (sc != c);
diff --git a/source/blender/blenloader/intern/readfile.c 
b/source/blender/blenloader/intern/readfile.c
index f85e8d51778..3e814816cdb 100644
--- a/source/blender/blenloader/intern/readfile.c
+++ b/source/blender/blenloader/intern/readfile.c
@@ -1186,7 +1186,7 @@ static int fd_read_data_from_file(FileData *filedata,
     filedata->file_offset += readsize;
   }
 
-  return (readsize);
+  return readsize;
 }
 
 static off64_t fd_seek_data_from_file(FileData *filedata, off64_t offset, int 
whence)
@@ -1211,7 +1211,7 @@ static int fd_read_gzip_from_file(FileData *filedata,
     filedata->file_offset += readsize;
   }
 
-  return (readsize);
+  return readsize;
 }
 
 /* Memory reading. */
@@ -1227,7 +1227,7 @@ static int fd_read_from_memory(FileData *filedata,
   memcpy(buffer, filedata->buffer + filedata->fil

@@ Diff output truncated at 10240 characters. @@

_______________________________________________
Bf-blender-cvs mailing list
[email protected]
https://lists.blender.org/mailman/listinfo/bf-blender-cvs

Reply via email to