Replace boost::optional with std::optional (#4877)
This commit is contained in:
@@ -3,12 +3,12 @@
|
||||
#include "util/RapidjsonHelpers.hpp"
|
||||
#include "util/RapidJsonSerializeQString.hpp"
|
||||
|
||||
#include <boost/optional.hpp>
|
||||
#include <pajlada/serialize.hpp>
|
||||
#include <QRegularExpression>
|
||||
#include <QString>
|
||||
|
||||
#include <memory>
|
||||
#include <optional>
|
||||
|
||||
namespace chatterino {
|
||||
|
||||
@@ -59,18 +59,18 @@ public:
|
||||
return this->isCaseSensitive_;
|
||||
}
|
||||
|
||||
[[nodiscard]] boost::optional<QString> match(
|
||||
[[nodiscard]] std::optional<QString> match(
|
||||
const QString &usernameText) const
|
||||
{
|
||||
if (this->isRegex())
|
||||
{
|
||||
if (!this->regex_.isValid())
|
||||
{
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
if (this->name().isEmpty())
|
||||
{
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
auto workingCopy = usernameText;
|
||||
@@ -90,7 +90,7 @@ public:
|
||||
}
|
||||
}
|
||||
|
||||
return boost::none;
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
private:
|
||||
|
||||
Reference in New Issue
Block a user