phrocker commented on a change in pull request #472: MINIFICPP-710 - Fix errors in Property StringToInt conversion URL: https://github.com/apache/nifi-minifi-cpp/pull/472#discussion_r246972159
########## File path: libminifi/include/core/TypedValues.h ########## @@ -141,6 +141,47 @@ class TimePeriodValue : public TransformableValue, public state::response::UInt6 * format <numeric> <byte size>. */ class DataSizeValue : public TransformableValue, public state::response::UInt64Value { +private: + + //Signed + template<typename T, typename std::enable_if<std::is_signed<T>::value, T>::type* = nullptr> + static bool AssignIfFits(int64_t base, uint64_t mult, T& output) { + int64_t val = base * mult; + if(val >= std::numeric_limits<T>::min() && val <= std::numeric_limits<T>::max()) { + output = val; + return true; + } + return false; + } + Review comment: Appveyor showed that it didn't. Do you have access to windows? I can probably help with that since I do. ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services