fix: more MSVC warnings (#5137)
This commit is contained in:
@@ -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