summaryrefslogtreecommitdiff
path: root/redfish-core/include/query.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'redfish-core/include/query.hpp')
-rw-r--r--redfish-core/include/query.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/redfish-core/include/query.hpp b/redfish-core/include/query.hpp
index e68b89ae00..063f1a8ef2 100644
--- a/redfish-core/include/query.hpp
+++ b/redfish-core/include/query.hpp
@@ -147,13 +147,15 @@ inline bool handleIfMatch(crow::App& app, const crow::Request& req,
bool needToCallHandlers = true;
-#ifdef BMCWEB_ENABLE_REDFISH_AGGREGATION
- needToCallHandlers = RedfishAggregator::beginAggregation(req, asyncResp) ==
- Result::LocalHandle;
+ if constexpr (BMCWEB_REDFISH_AGGREGATION)
+ {
+ needToCallHandlers = RedfishAggregator::beginAggregation(
+ req, asyncResp) == Result::LocalHandle;
- // If the request should be forwarded to a satellite BMC then we don't want
- // to write anything to the asyncResp since it will get overwritten later.
-#endif
+ // If the request should be forwarded to a satellite BMC then we don't
+ // want to write anything to the asyncResp since it will get overwritten
+ // later.
+ }
// If this isn't a get, no need to do anything with parameters
if (req.method() != boost::beast::http::verb::get)