fix: more MSVC warnings (#5137)
This commit is contained in:
@@ -8,4 +8,16 @@ Message::Message(QJsonObject _json)
|
||||
{
|
||||
}
|
||||
|
||||
std::optional<Message> parseBaseMessage(const QString &blob)
|
||||
{
|
||||
QJsonDocument jsonDoc(QJsonDocument::fromJson(blob.toUtf8()));
|
||||
|
||||
if (jsonDoc.isNull())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return Message(jsonDoc.object());
|
||||
}
|
||||
|
||||
} // namespace chatterino::seventv::eventapi
|
||||
|
||||
@@ -28,16 +28,6 @@ std::optional<InnerClass> Message::toInner()
|
||||
return InnerClass{this->data};
|
||||
}
|
||||
|
||||
static std::optional<Message> parseBaseMessage(const QString &blob)
|
||||
{
|
||||
QJsonDocument jsonDoc(QJsonDocument::fromJson(blob.toUtf8()));
|
||||
|
||||
if (jsonDoc.isNull())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return Message(jsonDoc.object());
|
||||
}
|
||||
std::optional<Message> parseBaseMessage(const QString &blob);
|
||||
|
||||
} // namespace chatterino::seventv::eventapi
|
||||
|
||||
@@ -2703,8 +2703,12 @@ void Helix::updateShieldMode(
|
||||
Qt::CaseInsensitive))
|
||||
{
|
||||
failureCallback(Error::UserMissingScope, message);
|
||||
break;
|
||||
}
|
||||
|
||||
failureCallback(Error::Forwarded, message);
|
||||
}
|
||||
break;
|
||||
case 401: {
|
||||
failureCallback(Error::Forwarded, message);
|
||||
}
|
||||
|
||||
@@ -16,4 +16,16 @@ PubSubMessage::PubSubMessage(QJsonObject _object)
|
||||
}
|
||||
}
|
||||
|
||||
std::optional<PubSubMessage> parsePubSubBaseMessage(const QString &blob)
|
||||
{
|
||||
QJsonDocument jsonDoc(QJsonDocument::fromJson(blob.toUtf8()));
|
||||
|
||||
if (jsonDoc.isNull())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return PubSubMessage(jsonDoc.object());
|
||||
}
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
@@ -45,17 +45,7 @@ std::optional<InnerClass> PubSubMessage::toInner()
|
||||
return InnerClass{this->nonce, data};
|
||||
}
|
||||
|
||||
static std::optional<PubSubMessage> parsePubSubBaseMessage(const QString &blob)
|
||||
{
|
||||
QJsonDocument jsonDoc(QJsonDocument::fromJson(blob.toUtf8()));
|
||||
|
||||
if (jsonDoc.isNull())
|
||||
{
|
||||
return std::nullopt;
|
||||
}
|
||||
|
||||
return PubSubMessage(jsonDoc.object());
|
||||
}
|
||||
std::optional<PubSubMessage> parsePubSubBaseMessage(const QString &blob);
|
||||
|
||||
} // namespace chatterino
|
||||
|
||||
|
||||
Reference in New Issue
Block a user