Enable clang-tidy forward reference checks
Clang-13 adds new checks we can turn on, which find quite a few errors.
Tested: Code compiles
Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: I74b780760014c898cc440b37aea640b33e91c439
diff --git a/redfish-core/lib/ethernet.hpp b/redfish-core/lib/ethernet.hpp
index 049f9a6..8735178 100644
--- a/redfish-core/lib/ethernet.hpp
+++ b/redfish-core/lib/ethernet.hpp
@@ -931,7 +931,8 @@
CallbackFunc&& callback)
{
crow::connections::systemBus->async_method_call(
- [ethifaceId{std::string{ethifaceId}}, callback{std::move(callback)}](
+ [ethifaceId{std::string{ethifaceId}},
+ callback{std::forward<CallbackFunc>(callback)}](
const boost::system::error_code errorCode,
dbus::utility::ManagedObjectType& resp) {
EthernetInterfaceData ethData{};
@@ -982,7 +983,7 @@
void getEthernetIfaceList(CallbackFunc&& callback)
{
crow::connections::systemBus->async_method_call(
- [callback{std::move(callback)}](
+ [callback{std::forward<CallbackFunc>(callback)}](
const boost::system::error_code errorCode,
dbus::utility::ManagedObjectType& resp) {
// Callback requires vector<string> to retrieve all available