martinzink commented on code in PR #1946:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1946#discussion_r2073741222


##########
extensions/kafka/ConsumeKafka.cpp:
##########
@@ -18,68 +18,72 @@
 #include "ConsumeKafka.h"
 
 #include <algorithm>
+#include <ranges>
 
 #include "core/FlowFile.h"
 #include "core/ProcessSession.h"
 #include "minifi-cpp/core/PropertyValidator.h"
 #include "core/Resource.h"
+#include "utils/OptionalUtils.h"
+#include "utils/AttributeErrors.h"
 #include "utils/ProcessorConfigUtils.h"
 #include "utils/gsl.h"
+#include "utils/expected.h"
 
 using namespace std::literals::chrono_literals;
 
-namespace org::apache::nifi::minifi {
-namespace core {
+template<>
+struct 
std::hash<org::apache::nifi::minifi::processors::ConsumeKafka::KafkaMessageLocation>
 {
+  size_t operator()(const 
org::apache::nifi::minifi::processors::ConsumeKafka::KafkaMessageLocation 
&message_location) const noexcept {
+    return 
org::apache::nifi::minifi::utils::hash_combine(std::hash<std::string_view>{}(message_location.topic),
+        std::hash<int32_t>{}(message_location.partition));
+  }
+};
+
+namespace org::apache::nifi::minifi::processors {
 // The upper limit for Max Poll Time is 4 seconds. This is because Watchdog 
would potentially start
 // reporting issues with the processor health otherwise
-bool ConsumeKafkaMaxPollTimePropertyValidator::validate(const std::string_view 
input) const {
+bool consume_kafka::ConsumeKafkaMaxPollTimePropertyValidator::validate(const 
std::string_view input) const {
   const auto parsed_time = 
parsing::parseDurationMinMax<std::chrono::nanoseconds>(input, 0ms, 4s);
   return parsed_time.has_value();
 }
-}  // namespace core
-
-namespace processors {
 
 void ConsumeKafka::initialize() {
   setSupportedProperties(Properties);
   setSupportedRelationships(Relationships);
 }
 
-void ConsumeKafka::onSchedule(core::ProcessContext& context, 
core::ProcessSessionFactory&) {
+void ConsumeKafka::onSchedule(core::ProcessContext &context, 
core::ProcessSessionFactory &) {

Review Comment:
   yeah, I have no idea what was this about, i use CLion its set to use the 
provided .clang-format file and in it its explicitly set to Pointer Alignemnt 
Left Refernece Alignment Left but still it auto formated like this...
   fixed it in 
https://github.com/apache/nifi-minifi-cpp/pull/1946/commits/db8aba0f31559bcc4c4299a453b06f94826a81d7



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to