fgerlits commented on code in PR #1651:
URL: https://github.com/apache/nifi-minifi-cpp/pull/1651#discussion_r1328436591
##########
libminifi/src/c2/C2Agent.cpp:
##########
@@ -686,6 +686,23 @@ C2Payload C2Agent::bundleDebugInfo(std::map<std::string,
std::unique_ptr<io::Inp
throw C2DebugBundleError("Error while writing file '" + filename + "'
into the debug bundle");
}
}
+ if (auto node_reporter = node_reporter_.lock()) {
+ constexpr const char* MANIFEST_FILE_NAME = "manifest.json";
Review Comment:
The difference is that in the case of plain `constexpr`, the compiler is
allowed to optimize out putting the pointer on the stack, and in the case of
`static constexpr`, it is required to. You can see the difference if you
change the example to `-O0`.
In practice, of course we always do optimized builds, and putting a pointer
on the stack is not costly, so maybe I should have written "very minor" instead
of "minor". But I think as a matter of coding style, we should always make
function-local `constexpr` variables `static`.
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]