summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.clang-tidy1
-rw-r--r--http/utility.hpp2
-rw-r--r--redfish-core/include/utils/json_utils.hpp3
3 files changed, 4 insertions, 2 deletions
diff --git a/.clang-tidy b/.clang-tidy
index ca103f34cf..5b530c3791 100644
--- a/.clang-tidy
+++ b/.clang-tidy
@@ -357,4 +357,5 @@ CheckOptions:
- { key: readability-identifier-naming.FunctionIgnoredRegexp, value: (BMCWEB_LOG_DEBUG|BMCWEB_LOG_INFO|BMCWEB_LOG_WARNING|BMCWEB_LOG_ERROR|BMCWEB_LOG_CRITICAL) }
- { key: cppcoreguidelines-macro-usage.AllowedRegexp, value: DEBUG*|NLOHMANN_JSON_SERIALIZE_ENUM }
- { key: performance-unnecessary-value-param.AllowedTypes, value: ((segments_view)|(url_view)) }
+ - { key: cppcoreguidelines-rvalue-reference-param-not-moved.IgnoreUnnamedParams, value: true }
- { key: misc-include-cleaner.IgnoreHeaders, value: ((nlohmann/json_fwd.hpp)|(boost/.*/src.hpp)|(boost/.*/detail/.*)|(nlohmann/detail/.*)|(stdio.h)|(ranges)|(bits/chrono.h)|(boost/system/error_code.hpp)) }
diff --git a/http/utility.hpp b/http/utility.hpp
index 47ddaf91b1..0476d73c74 100644
--- a/http/utility.hpp
+++ b/http/utility.hpp
@@ -439,7 +439,7 @@ class UrlSegmentMatcherVisitor
};
inline bool readUrlSegments(boost::urls::url_view url,
- std::initializer_list<UrlSegment>&& segments)
+ std::initializer_list<UrlSegment> segments)
{
boost::urls::segments_view urlSegments = url.segments();
diff --git a/redfish-core/include/utils/json_utils.hpp b/redfish-core/include/utils/json_utils.hpp
index c8af2d15db..0f4ba06a14 100644
--- a/redfish-core/include/utils/json_utils.hpp
+++ b/redfish-core/include/utils/json_utils.hpp
@@ -542,7 +542,8 @@ bool readJson(nlohmann::json& jsonRequest, crow::Response& res,
messages::unrecognizedRequestBody(res);
return false;
}
- return readJsonObject(*obj, res, key, first, in...);
+ return readJsonObject(*obj, res, key, std::forward<FirstType>(first),
+ std::forward<UnpackTypes&&>(in)...);
}
inline std::optional<nlohmann::json::object_t>