Github user phrocker commented on a diff in the pull request:
https://github.com/apache/nifi-minifi-cpp/pull/408#discussion_r222283444
--- Diff: libminifi/src/c2/protocols/RESTProtocol.cpp ---
@@ -160,12 +160,12 @@ rapidjson::Value RESTProtocol::getStringValue(const
std::string& value, rapidjso
void RESTProtocol::mergePayloadContent(rapidjson::Value &target, const
C2Payload &payload, rapidjson::Document::AllocatorType &alloc) {
const std::vector<C2ContentResponse> &content = payload.getContent();
- bool all_empty = content.size() > 0 ? true : false;
--- End diff --
I think this is reasonable -- for msvc these generate different assembler
output as ::size generates a cached size, whereas empty does not; however,
these aren't necessarily hot paths so I appreciate the readability improvement.
---