szaszm commented on a change in pull request #1028:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1028#discussion_r595819327
##########
File path: extensions/standard-processors/processors/ExtractText.cpp
##########
@@ -126,22 +125,22 @@ int64_t ExtractText::ReadCallback::process(const
std::shared_ptr<io::BaseStream>
if (sizeLimitStr.empty())
size_limit = DEFAULT_SIZE_LIMIT;
else if (sizeLimitStr != "0")
- size_limit = std::stoi(sizeLimitStr);
+ size_limit = gsl::narrow_cast<size_t>(std::stoi(sizeLimitStr));
Review comment:
Actually it would make sense to cast them to `size_t` and treat `-1` as
"essentially no limit" instead of throwing. If you think this is a good idea,
I'll change it to `static_cast<size_t>(...)`.
----------------------------------------------------------------
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]