nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From GitBox <...@apache.org>
Subject [GitHub] [nifi-minifi-cpp] szaszm commented on a change in pull request #710: MINIFICPP - 1110, 1111 - PublishKafka, OPC processors should config and
Date Thu, 06 Feb 2020 14:52:46 GMT
szaszm commented on a change in pull request #710: MINIFICPP - 1110,1111 - PublishKafka, OPC
processors should config and
URL: https://github.com/apache/nifi-minifi-cpp/pull/710#discussion_r375847455
 
 

 ##########
 File path: libminifi/include/core/state/Value.h
 ##########
 @@ -188,6 +264,18 @@ class BoolValue : public Value {
     }
   }
 
+  virtual bool getValue(uint32_t &ref) {
 
 Review comment:
   Isn't this function meant to validate and return `value` instead of just validating and
self-assigning `ref`?
   If I'm right:
   ```
   if (value != 0 && value != 1) { return false; }
   ref = (value != 0);
   return true;
   ```
   If the protocol allows it, I'd even go as far as skipping the validation and interpreting
everything non-zero as true.
   
   Also: "A member function template shall not be virtual."
   source: C++ standard draft, 13.7.2 [temp.mem] 3), http://open-std.org/JTC1/SC22/WG21/docs/papers/2019/n4835.pdf


----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

Mime
View raw message