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:
authorOmar Emara <mail@OmarEmara.dev>2022-08-10 14:04:36 +0300
committerOmar Emara <mail@OmarEmara.dev>2022-08-10 14:04:36 +0300
commit79953d548281870a046c4d4babccedb446cdf00a (patch)
tree13d855e17f56ed0c88a3d29215155ad365bd0479 /source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
parent089216067faa6c99d0282f9bae26f739d7e50ee9 (diff)
Realtime Compositor: Fix clang tidy warnings
Fix a number of warnings reported by Clang Tidy in the realtime compositor's code. Differential Revision: https://developer.blender.org/D15654 Reviewed By: Clement Foucault
Diffstat (limited to 'source/blender/compositor/realtime_compositor/intern/conversion_operation.cc')
-rw-r--r--source/blender/compositor/realtime_compositor/intern/conversion_operation.cc21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc b/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
index e1b0814ccd7..d6bf74ffbee 100644
--- a/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
+++ b/source/blender/compositor/realtime_compositor/intern/conversion_operation.cc
@@ -51,27 +51,32 @@ SimpleOperation *ConversionOperation::construct_if_needed(Context &context,
/* If the result type differs from the expected type, return an instance of an appropriate
* conversion operation. Otherwise, return a null pointer. */
+
if (result_type == ResultType::Float && expected_type == ResultType::Vector) {
return new ConvertFloatToVectorOperation(context);
}
- else if (result_type == ResultType::Float && expected_type == ResultType::Color) {
+
+ if (result_type == ResultType::Float && expected_type == ResultType::Color) {
return new ConvertFloatToColorOperation(context);
}
- else if (result_type == ResultType::Color && expected_type == ResultType::Float) {
+
+ if (result_type == ResultType::Color && expected_type == ResultType::Float) {
return new ConvertColorToFloatOperation(context);
}
- else if (result_type == ResultType::Color && expected_type == ResultType::Vector) {
+
+ if (result_type == ResultType::Color && expected_type == ResultType::Vector) {
return new ConvertColorToVectorOperation(context);
}
- else if (result_type == ResultType::Vector && expected_type == ResultType::Float) {
+
+ if (result_type == ResultType::Vector && expected_type == ResultType::Float) {
return new ConvertVectorToFloatOperation(context);
}
- else if (result_type == ResultType::Vector && expected_type == ResultType::Color) {
+
+ if (result_type == ResultType::Vector && expected_type == ResultType::Color) {
return new ConvertVectorToColorOperation(context);
}
- else {
- return nullptr;
- }
+
+ return nullptr;
}
/* -------------------------------------------------------------------------------------------------