added brace wrapping after if and for
This commit is contained in:
@@ -8,13 +8,15 @@ namespace chatterino {
|
||||
|
||||
const rapidjson::Value &getArgs(const rapidjson::Value &data)
|
||||
{
|
||||
if (!data.HasMember("args")) {
|
||||
if (!data.HasMember("args"))
|
||||
{
|
||||
throw std::runtime_error("Missing member args");
|
||||
}
|
||||
|
||||
const auto &args = data["args"];
|
||||
|
||||
if (!args.IsArray()) {
|
||||
if (!args.IsArray())
|
||||
{
|
||||
throw std::runtime_error("args must be an array");
|
||||
}
|
||||
|
||||
@@ -43,12 +45,14 @@ rapidjson::Document createListenMessage(
|
||||
|
||||
rapidjson::Value data(rapidjson::kObjectType);
|
||||
|
||||
if (account) {
|
||||
if (account)
|
||||
{
|
||||
rj::set(data, "auth_token", account->getOAuthToken(), a);
|
||||
}
|
||||
|
||||
rapidjson::Value topics(rapidjson::kArrayType);
|
||||
for (const auto &topic : topicsVec) {
|
||||
for (const auto &topic : topicsVec)
|
||||
{
|
||||
rj::add(topics, topic, a);
|
||||
}
|
||||
|
||||
@@ -70,7 +74,8 @@ rapidjson::Document createUnlistenMessage(
|
||||
rapidjson::Value data(rapidjson::kObjectType);
|
||||
|
||||
rapidjson::Value topics(rapidjson::kArrayType);
|
||||
for (const auto &topic : topicsVec) {
|
||||
for (const auto &topic : topicsVec)
|
||||
{
|
||||
rj::add(topics, topic, a);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user