Remove fields member from Request
Per cpp core guidelines, we should be returning this via a function
call, not a direct member variable. Doing this also improves the
safety, as we don't have to remember to move the references over in a
move.
Tested: Tested as part of top patch in series.
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I837d6fd277ffa076ba5425003d6e6ee79204d014
diff --git a/redfish-core/lib/task.hpp b/redfish-core/lib/task.hpp
index 95fa0c0..2e7481a 100644
--- a/redfish-core/lib/task.hpp
+++ b/redfish-core/lib/task.hpp
@@ -63,7 +63,7 @@
return;
}
- for (const auto& field : req.fields)
+ for (const auto& field : req.fields())
{
if (std::find(headerWhitelist.begin(), headerWhitelist.end(),
field.name()) == headerWhitelist.end())