Replace boost::optional with std::optional (#4877)
This commit is contained in:
@@ -2,11 +2,12 @@
|
||||
|
||||
#include "common/QLogging.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
#include <QString>
|
||||
|
||||
#include <optional>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
struct PubSubMessageMessage {
|
||||
@@ -42,15 +43,15 @@ struct PubSubMessageMessage {
|
||||
}
|
||||
|
||||
template <class InnerClass>
|
||||
boost::optional<InnerClass> toInner() const;
|
||||
std::optional<InnerClass> toInner() const;
|
||||
};
|
||||
|
||||
template <class InnerClass>
|
||||
boost::optional<InnerClass> PubSubMessageMessage::toInner() const
|
||||
std::optional<InnerClass> PubSubMessageMessage::toInner() const
|
||||
{
|
||||
if (this->messageObject.empty())
|
||||
{
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return InnerClass{this->messageObject};
|
||||
|
||||
Reference in New Issue
Block a user