-
Notifications
You must be signed in to change notification settings - Fork 136
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Core: Avoid redundant links when pasting #1556
Conversation
Cpp-Linter Report ✔️No problems need attention. Have any feedback or feature suggestions? Share it here. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Click here for the full clang-tidy patch
diff --git a/src/core/links/linkevaluator.cpp b/src/core/links/linkevaluator.cpp
index 3b95cae..92740d9 100644
--- a/src/core/links/linkevaluator.cpp
+++ b/src/core/links/linkevaluator.cpp
@@ -207 +207 @@ void LinkEvaluator::evaluateLinksFromProperty(Property* modifiedProperty) {
- VisitedHelper helper(visited_, links);
+ const VisitedHelper helper(visited_, links);
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
Click here for the full clang-tidy patch
diff --git a/src/core/links/linkevaluator.cpp b/src/core/links/linkevaluator.cpp
index b6ccd7a..7867fcc 100644
--- a/src/core/links/linkevaluator.cpp
+++ b/src/core/links/linkevaluator.cpp
@@ -178 +178 @@ void LinkEvaluator::transientCacheHelper(std::vector<ConvertibleLink>& links, Pr
- if (auto converter = manager->getConverter(src, dst)) {
+ if (const auto* converter = manager->getConverter(src, dst)) {
@@ -195,2 +195,2 @@ void LinkEvaluator::transientCacheHelper(std::vector<ConvertibleLink>& links, Pr
- if (auto cp = dynamic_cast<CompositeProperty*>(dst)) {
- for (auto& newSrc : cp->getProperties()) {
+ if (auto* cp = dynamic_cast<CompositeProperty*>(dst)) {
+ for (const auto& newSrc : cp->getProperties()) {
diff --git a/src/core/network/autolinker.cpp b/src/core/network/autolinker.cpp
index 09876d9..b990ba5 100644
--- a/src/core/network/autolinker.cpp
+++ b/src/core/network/autolinker.cpp
@@ -72 +72 @@ AutoLinker::AutoLinker(ProcessorNetwork* network, Processor* target, Processor*
- for (auto& targetProperty : targetProperties) {
+ for (const auto& targetProperty : targetProperties) {
@@ -98 +98 @@ AutoLinker::AutoLinker(ProcessorNetwork* network, Processor* target, Processor*
- return proc && proc->getClassIdentifier() == processorClassId &&
+ return (proc != nullptr) && proc->getClassIdentifier() == processorClassId &&
Have any feedback or feature suggestions? Share it here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cpp-linter Review
No concerns from clang-tidy.
Great job! 🎉
Have any feedback or feature suggestions? Share it here.
Fixes #...
Changes proposed in this PR:
This has been tested on: ...