Replace boost::optional with std::optional (#4877)

This commit is contained in:
pajlada
2023-10-08 18:50:48 +02:00
committed by GitHub
parent fe4d6121a2
commit fec45889a8
88 changed files with 428 additions and 383 deletions
+4 -5
View File
@@ -3,9 +3,8 @@
#include "common/Aliases.hpp"
#include "common/Atomic.hpp"
#include <boost/optional.hpp>
#include <memory>
#include <optional>
namespace chatterino {
@@ -27,7 +26,7 @@ public:
BttvEmotes();
std::shared_ptr<const EmoteMap> emotes() const;
boost::optional<EmotePtr> emote(const EmoteName &name) const;
std::optional<EmotePtr> emote(const EmoteName &name) const;
void loadEmotes();
void setEmotes(std::shared_ptr<const EmoteMap> emotes);
static void loadChannel(std::weak_ptr<Channel> channel,
@@ -55,7 +54,7 @@ public:
*
* @return pair<old emote, new emote> if any emote was updated.
*/
static boost::optional<std::pair<EmotePtr, EmotePtr>> updateEmote(
static std::optional<std::pair<EmotePtr, EmotePtr>> updateEmote(
const QString &channelDisplayName,
Atomic<std::shared_ptr<const EmoteMap>> &channelEmoteMap,
const BttvLiveUpdateEmoteUpdateAddMessage &message);
@@ -67,7 +66,7 @@ public:
*
* @return The removed emote if any emote was removed.
*/
static boost::optional<EmotePtr> removeEmote(
static std::optional<EmotePtr> removeEmote(
Atomic<std::shared_ptr<const EmoteMap>> &channelEmoteMap,
const BttvLiveUpdateEmoteRemoveMessage &message);