You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by sz...@apache.org on 2021/05/26 12:46:13 UTC
[nifi-minifi-cpp] 05/17: fix compilation on some platforms with
size_t not the same as uint64_t 2
This is an automated email from the ASF dual-hosted git repository.
szaszm pushed a commit to branch MINIFICPP-1507
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit d4c4d80dc39ea25cfeebcf0a18543943681ce259
Author: Marton Szasz <sz...@gmail.com>
AuthorDate: Tue Mar 16 14:12:35 2021 +0100
fix compilation on some platforms with size_t not the same as uint64_t 2
---
extensions/standard-processors/processors/ExtractText.cpp | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/extensions/standard-processors/processors/ExtractText.cpp b/extensions/standard-processors/processors/ExtractText.cpp
index 04e5e91..888ec47 100644
--- a/extensions/standard-processors/processors/ExtractText.cpp
+++ b/extensions/standard-processors/processors/ExtractText.cpp
@@ -161,8 +161,11 @@ int64_t ExtractText::ReadCallback::process(const std::shared_ptr<io::BaseStream>
bool repeatingcapture;
ctx_->getProperty(EnableRepeatingCaptureGroup.getName(), repeatingcapture);
- size_t maxCaptureSize;
- ctx_->getProperty(MaxCaptureGroupLen.getName(), maxCaptureSize);
+ const size_t maxCaptureSize = [this]{
+ uint64_t val;
+ ctx_->getProperty(MaxCaptureGroupLen.getName(), val);
+ return size_t{val};
+ }();
std::string contentStr = contentStream.str();