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:
authorJacques Lucke <jacques@blender.org>2021-02-15 17:30:17 +0300
committerJacques Lucke <jacques@blender.org>2021-02-15 17:30:17 +0300
commitd3960164163c910d5031a8f076c41b39e0a5503d (patch)
tree2931c76ced3945e8f06c9c163cba37b69d06f640 /source/blender/editors
parentb55e7e489504f43076eec423bc8dfb7efbeb4fac (diff)
Cleanup: clang tidy
Diffstat (limited to 'source/blender/editors')
-rw-r--r--source/blender/editors/interface/interface_utils.c38
-rw-r--r--source/blender/editors/space_clip/clip_utils.c13
-rw-r--r--source/blender/editors/util/ed_util_ops.cc2
3 files changed, 24 insertions, 29 deletions
diff --git a/source/blender/editors/interface/interface_utils.c b/source/blender/editors/interface/interface_utils.c
index f9eba9eeb6f..af058264f25 100644
--- a/source/blender/editors/interface/interface_utils.c
+++ b/source/blender/editors/interface/interface_utils.c
@@ -546,19 +546,19 @@ int UI_icon_from_report_type(int type)
if (type & RPT_ERROR_ALL) {
return ICON_CANCEL;
}
- else if (type & RPT_WARNING_ALL) {
+ if (type & RPT_WARNING_ALL) {
return ICON_ERROR;
}
- else if (type & RPT_INFO_ALL) {
+ if (type & RPT_INFO_ALL) {
return ICON_INFO;
}
- else if (type & RPT_DEBUG_ALL) {
+ if (type & RPT_DEBUG_ALL) {
return ICON_SYSTEM;
}
- else if (type & RPT_PROPERTY) {
+ if (type & RPT_PROPERTY) {
return ICON_OPTIONS;
}
- else if (type & RPT_OPERATOR) {
+ if (type & RPT_OPERATOR) {
return ICON_CHECKMARK;
}
return ICON_INFO;
@@ -569,24 +569,22 @@ int UI_icon_colorid_from_report_type(int type)
if (type & RPT_ERROR_ALL) {
return TH_INFO_ERROR;
}
- else if (type & RPT_WARNING_ALL) {
+ if (type & RPT_WARNING_ALL) {
return TH_INFO_WARNING;
}
- else if (type & RPT_INFO_ALL) {
+ if (type & RPT_INFO_ALL) {
return TH_INFO_INFO;
}
- else if (type & RPT_DEBUG_ALL) {
+ if (type & RPT_DEBUG_ALL) {
return TH_INFO_DEBUG;
}
- else if (type & RPT_PROPERTY) {
+ if (type & RPT_PROPERTY) {
return TH_INFO_PROPERTY;
}
- else if (type & RPT_OPERATOR) {
+ if (type & RPT_OPERATOR) {
return TH_INFO_OPERATOR;
}
- else {
- return TH_INFO_WARNING;
- }
+ return TH_INFO_WARNING;
}
int UI_text_colorid_from_report_type(int type)
@@ -594,24 +592,22 @@ int UI_text_colorid_from_report_type(int type)
if (type & RPT_ERROR_ALL) {
return TH_INFO_ERROR_TEXT;
}
- else if (type & RPT_WARNING_ALL) {
+ if (type & RPT_WARNING_ALL) {
return TH_INFO_WARNING_TEXT;
}
- else if (type & RPT_INFO_ALL) {
+ if (type & RPT_INFO_ALL) {
return TH_INFO_INFO_TEXT;
}
- else if (type & RPT_DEBUG_ALL) {
+ if (type & RPT_DEBUG_ALL) {
return TH_INFO_DEBUG_TEXT;
}
- else if (type & RPT_PROPERTY) {
+ if (type & RPT_PROPERTY) {
return TH_INFO_PROPERTY_TEXT;
}
- else if (type & RPT_OPERATOR) {
+ if (type & RPT_OPERATOR) {
return TH_INFO_OPERATOR_TEXT;
}
- else {
- return TH_INFO_WARNING_TEXT;
- }
+ return TH_INFO_WARNING_TEXT;
}
/********************************** Misc **************************************/
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c
index bb79eb34129..dbf733413e5 100644
--- a/source/blender/editors/space_clip/clip_utils.c
+++ b/source/blender/editors/space_clip/clip_utils.c
@@ -509,13 +509,12 @@ static bool mask_has_selection(const bContext *C)
if (BKE_mask_point_handles_mode_get(point) == MASK_HANDLE_MODE_STICK) {
return true;
}
- else {
- if ((bezt->f1 & SELECT) && (bezt->h1 != HD_VECT)) {
- return true;
- }
- if ((bezt->f3 & SELECT) && (bezt->h2 != HD_VECT)) {
- return true;
- }
+
+ if ((bezt->f1 & SELECT) && (bezt->h1 != HD_VECT)) {
+ return true;
+ }
+ if ((bezt->f3 & SELECT) && (bezt->h2 != HD_VECT)) {
+ return true;
}
}
}
diff --git a/source/blender/editors/util/ed_util_ops.cc b/source/blender/editors/util/ed_util_ops.cc
index cb7ff9f3a63..5b2e1a16bc2 100644
--- a/source/blender/editors/util/ed_util_ops.cc
+++ b/source/blender/editors/util/ed_util_ops.cc
@@ -20,7 +20,7 @@
* Utility operators for UI data or for the UI to use.
*/
-#include <string.h>
+#include <cstring>
#include "DNA_space_types.h"
#include "DNA_windowmanager_types.h"