You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@nifi.apache.org by ma...@apache.org on 2025/03/14 09:28:25 UTC
(nifi-minifi-cpp) 04/15: use string_view in ParsingUtils.cpp::getUnitMultipler::unit_map
This is an automated email from the ASF dual-hosted git repository.
martinzink pushed a commit to branch minifi-api-property
in repository https://gitbox.apache.org/repos/asf/nifi-minifi-cpp.git
commit f82537002176f3d75f05e5acfdcbbd8e0fd72483
Author: Martin Zink <ma...@apache.org>
AuthorDate: Wed Mar 12 12:57:31 2025 +0100
use string_view in ParsingUtils.cpp::getUnitMultipler::unit_map
---
utils/src/utils/ParsingUtils.cpp | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/utils/src/utils/ParsingUtils.cpp b/utils/src/utils/ParsingUtils.cpp
index 2f4490a07..04843e005 100644
--- a/utils/src/utils/ParsingUtils.cpp
+++ b/utils/src/utils/ParsingUtils.cpp
@@ -29,7 +29,7 @@ nonstd::expected<bool, std::error_code> parseBool(const std::string_view input)
namespace {
uint64_t getUnitMultiplier(const std::string_view unit_str) {
- static std::map<std::string, int64_t, std::less<>> unit_map{
+ static std::map<std::string_view, int64_t, std::less<>> unit_map{
{"B", 1},
{"K", 1_KB},
{"M", 1_MB},