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
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')
-rw-r--r--source/blender/compositor/realtime_compositor/COM_operation.hh2
-rw-r--r--source/blender/compositor/realtime_compositor/COM_realize_on_domain_operation.hh2
-rw-r--r--source/blender/compositor/realtime_compositor/intern/conversion_operation.cc21
-rw-r--r--source/blender/compositor/realtime_compositor/intern/evaluator.cc2
4 files changed, 16 insertions, 11 deletions
diff --git a/source/blender/compositor/realtime_compositor/COM_operation.hh b/source/blender/compositor/realtime_compositor/COM_operation.hh
index 4343401cefb..38518c00c04 100644
--- a/source/blender/compositor/realtime_compositor/COM_operation.hh
+++ b/source/blender/compositor/realtime_compositor/COM_operation.hh
@@ -146,7 +146,7 @@ class Operation {
void declare_input_descriptor(StringRef identifier, InputDescriptor descriptor);
/* Get a reference to the descriptor of the input identified by the given identified. */
- InputDescriptor &get_input_descriptor(StringRef identified);
+ InputDescriptor &get_input_descriptor(StringRef identifier);
/* Returns a reference to the compositor context. */
Context &context();
diff --git a/source/blender/compositor/realtime_compositor/COM_realize_on_domain_operation.hh b/source/blender/compositor/realtime_compositor/COM_realize_on_domain_operation.hh
index 357a3f88bd9..5a842e16008 100644
--- a/source/blender/compositor/realtime_compositor/COM_realize_on_domain_operation.hh
+++ b/source/blender/compositor/realtime_compositor/COM_realize_on_domain_operation.hh
@@ -35,7 +35,7 @@ class RealizeOnDomainOperation : public SimpleOperation {
static SimpleOperation *construct_if_needed(Context &context,
const Result &input_result,
const InputDescriptor &input_descriptor,
- const Domain &operaiton_domain);
+ const Domain &operation_domain);
protected:
/* The operation domain is just the target domain. */
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;
}
/* -------------------------------------------------------------------------------------------------
diff --git a/source/blender/compositor/realtime_compositor/intern/evaluator.cc b/source/blender/compositor/realtime_compositor/intern/evaluator.cc
index 597453baf21..d358389f2e9 100644
--- a/source/blender/compositor/realtime_compositor/intern/evaluator.cc
+++ b/source/blender/compositor/realtime_compositor/intern/evaluator.cc
@@ -67,7 +67,7 @@ bool Evaluator::validate_node_tree()
void Evaluator::compile_and_evaluate()
{
- derived_node_tree_.reset(new DerivedNodeTree(node_tree_, node_tree_reference_map_));
+ derived_node_tree_ = std::make_unique<DerivedNodeTree>(node_tree_, node_tree_reference_map_);
if (!validate_node_tree()) {
return;