diff options
-rw-r--r-- | utils.cpp | 13 | ||||
-rw-r--r-- | utils.hpp | 6 |
2 files changed, 9 insertions, 10 deletions
@@ -227,15 +227,14 @@ void setDbusProperty(sdbusplus::bus::bus& bus, const std::string& service, } ServiceCache::ServiceCache(const std::string& intf, const std::string& path) : - intf(intf), path(path), cachedService(std::experimental::nullopt), - cachedBusName(std::experimental::nullopt) + intf(intf), path(path), cachedService(std::nullopt), + cachedBusName(std::nullopt) { } ServiceCache::ServiceCache(std::string&& intf, std::string&& path) : - intf(std::move(intf)), path(std::move(path)), - cachedService(std::experimental::nullopt), - cachedBusName(std::experimental::nullopt) + intf(std::move(intf)), path(std::move(path)), cachedService(std::nullopt), + cachedBusName(std::nullopt) { } @@ -251,8 +250,8 @@ const std::string& ServiceCache::getService(sdbusplus::bus::bus& bus) void ServiceCache::invalidate() { - cachedBusName = std::experimental::nullopt; - cachedService = std::experimental::nullopt; + cachedBusName = std::nullopt; + cachedService = std::nullopt; } sdbusplus::message::message @@ -1,7 +1,7 @@ #pragma once #include "types.hpp" -#include <experimental/optional> +#include <optional> #include <sdbusplus/server.hpp> namespace ipmi @@ -76,9 +76,9 @@ class ServiceCache /** @brief DBUS path provided by the service */ const std::string path; /** @brief The name of the service if valid */ - std::experimental::optional<std::string> cachedService; + std::optional<std::string> cachedService; /** @brief The name of the bus used in the service lookup */ - std::experimental::optional<std::string> cachedBusName; + std::optional<std::string> cachedBusName; }; /** |