Remove custom version of getPtr
Now that sdbusplus variant supports std::get_if, we can remove our
custom, mapbox namespaced implementation that does the same thing.
Change-Id: I854c473003e28e41dd45dba08ca683433f1c1774
Signed-off-by: Ed Tanous <ed.tanous@intel.com>
diff --git a/redfish-core/lib/log_services.hpp b/redfish-core/lib/log_services.hpp
index cf4af02..6f87307 100644
--- a/redfish-core/lib/log_services.hpp
+++ b/redfish-core/lib/log_services.hpp
@@ -1102,7 +1102,7 @@
return;
}
const std::string *log =
- mapbox::getPtr<const std::string>(resp);
+ sdbusplus::message::variant_ns::get_if<std::string>(&resp);
if (log == nullptr)
{
messages::internalError(asyncResp->res);
@@ -1204,8 +1204,9 @@
std::string, sdbusplus::message::variant<std::string>>>
interfacesAdded;
m.read(objPath, interfacesAdded);
- const std::string *log = mapbox::getPtr<const std::string>(
- interfacesAdded[cpuLogInterface]["Log"]);
+ const std::string *log =
+ sdbusplus::message::variant_ns::get_if<std::string>(
+ &interfacesAdded[cpuLogInterface]["Log"]);
if (log == nullptr)
{
messages::internalError(asyncResp->res);