Replace boost::optional with std::optional (#4877)
This commit is contained in:
@@ -21,7 +21,7 @@ ChatterinoBadges::ChatterinoBadges()
|
||||
{
|
||||
}
|
||||
|
||||
boost::optional<EmotePtr> ChatterinoBadges::getBadge(const UserId &id)
|
||||
std::optional<EmotePtr> ChatterinoBadges::getBadge(const UserId &id)
|
||||
{
|
||||
std::shared_lock lock(this->mutex_);
|
||||
|
||||
@@ -30,7 +30,7 @@ boost::optional<EmotePtr> ChatterinoBadges::getBadge(const UserId &id)
|
||||
{
|
||||
return emotes[it->second];
|
||||
}
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
void ChatterinoBadges::loadChatterinoBadges()
|
||||
|
||||
@@ -4,9 +4,8 @@
|
||||
#include "common/Singleton.hpp"
|
||||
#include "util/QStringHash.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
#include <shared_mutex>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
@@ -22,7 +21,7 @@ public:
|
||||
virtual void initialize(Settings &settings, Paths &paths) override;
|
||||
ChatterinoBadges();
|
||||
|
||||
boost::optional<EmotePtr> getBadge(const UserId &id);
|
||||
std::optional<EmotePtr> getBadge(const UserId &id);
|
||||
|
||||
private:
|
||||
void loadChatterinoBadges();
|
||||
|
||||
Reference in New Issue
Block a user