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


With regards,
Apache Git Services

Reply via email to