[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1553: MINIFICPP-2094 Change validators from shared to raw pointers
adamdebreceni commented on code in PR #1553: URL: https://github.com/apache/nifi-minifi-cpp/pull/1553#discussion_r1165631311 ## libminifi/include/core/PropertyValidation.h: ## @@ -87,22 +83,23 @@ class ValidationResult { class PropertyValidator { public: - PropertyValidator(std::string name) // NOLINT - : name_(std::move(name)) { + explicit constexpr PropertyValidator(std::string_view name) Review Comment: or rather just the copy since the move ctor is not generated with user declared destructor -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org
[GitHub] [nifi-minifi-cpp] adamdebreceni commented on a diff in pull request #1553: MINIFICPP-2094 Change validators from shared to raw pointers
adamdebreceni commented on code in PR #1553: URL: https://github.com/apache/nifi-minifi-cpp/pull/1553#discussion_r1165627512 ## libminifi/include/core/PropertyValidation.h: ## @@ -87,22 +83,23 @@ class ValidationResult { class PropertyValidator { public: - PropertyValidator(std::string name) // NOLINT - : name_(std::move(name)) { + explicit constexpr PropertyValidator(std::string_view name) Review Comment: should we disable copy/move ctor, so we don't accidentally store a pointer to a temporary? -- 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: issues-unsubscr...@nifi.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org