You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by GitBox <gi...@apache.org> on 2022/07/18 14:55:08 UTC

[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1354: MINIFICPP-1860 Integrate readability clang-tidy checks in CI

adamdebreceni commented on code in PR #1354:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1354#discussion_r923472754


##########
libminifi/src/core/Connectable.cpp:
##########
@@ -76,11 +72,7 @@ bool Connectable::isSupportedRelationship(const core::Relationship &relationship
   const auto conditionalLock = isConnectableRunning ? std::unique_lock<std::mutex>() : std::unique_lock<std::mutex>(relationship_mutex_);
 
   const auto &it = relationships_.find(relationship.getName());
-  if (it != relationships_.end()) {
-    return true;
-  } else {
-    return false;
-  }
+  return it != relationships_.end();

Review Comment:
   should we further reduce this using `contains`? (and at line 101)



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@nifi.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org