diff options
author | Ed Tanous <edtanous@google.com> | 2023-02-16 21:28:44 +0300 |
---|---|---|
committer | Ed Tanous <ed@tanous.net> | 2023-02-24 20:21:14 +0300 |
commit | 26ccae32112679c4653c1e3f8a1203c828bea05c (patch) | |
tree | a87d5056294e163b9ddeed9e867bcfb0750a8bb5 /redfish-core/include/redfish_aggregator.hpp | |
parent | 7da1c58890e82194ff83ca6c8d55b5c327f2444a (diff) | |
download | bmcweb-26ccae32112679c4653c1e3f8a1203c828bea05c.tar.xz |
Pass string views by value
string_view should always be passed by value; This commit is a sed
replace of the code to make all string_views pass by value, per general
coding guidelines[1].
[1] https://quuxplusone.github.io/blog/2021/11/09/pass-string-view-by-value/
Tested: Code compiles.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I55b342a29a0fbfce0a4ed9ea63db6014d03b134c
Diffstat (limited to 'redfish-core/include/redfish_aggregator.hpp')
-rw-r--r-- | redfish-core/include/redfish_aggregator.hpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redfish-core/include/redfish_aggregator.hpp b/redfish-core/include/redfish_aggregator.hpp index c2c2e1db66..080e67e681 100644 --- a/redfish-core/include/redfish_aggregator.hpp +++ b/redfish-core/include/redfish_aggregator.hpp @@ -44,7 +44,7 @@ constexpr std::array nonUriProperties{ // Determines if the passed property contains a URI. Those property names // either end with a case-insensitive version of "uri" or are specifically // defined in the above array. -inline bool isPropertyUri(const std::string_view propertyName) +inline bool isPropertyUri(std::string_view propertyName) { return boost::iends_with(propertyName, "uri") || std::binary_search(nonUriProperties.begin(), nonUriProperties.end(), |