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
+5 -5
View File
@@ -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: