arpadboda 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_r375826987
##########
File path: libminifi/include/core/state/Value.h
##########
@@ -188,6 +264,18 @@ class BoolValue : public Value {
}
}
+ virtual bool getValue(uint32_t &ref) {
Review comment:
Please, no!
Yes, it was already horrible, but that doesn't justify copy-pasting the
same! :)
```
template<typename Integral, typename std::enable_if<
(sizeof(Integral) >= 4) && std::is_integral<Integral>::value
,Integral>::type* = nullptr>
virtual bool getValue(Integral &ref) {
if(ref != 0 && ref != 1) {
return false;
}
ref = (ref == 1);
return true;
}
```
----------------------------------------------------------------
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