added brace wrapping after if and for

This commit is contained in:
fourtf
2018-10-21 13:43:02 +02:00
parent c6e1ec3c71
commit e259b9e39f
138 changed files with 4738 additions and 2237 deletions
+12 -6
View File
@@ -54,7 +54,8 @@ void LogsPopup::getRoomID()
{
TwitchChannel *twitchChannel =
dynamic_cast<TwitchChannel *>(this->channel_.get());
if (twitchChannel == nullptr) {
if (twitchChannel == nullptr)
{
return;
}
@@ -84,7 +85,8 @@ void LogsPopup::getLogviewerLogs()
{
TwitchChannel *twitchChannel =
dynamic_cast<TwitchChannel *>(this->channel_.get());
if (twitchChannel == nullptr) {
if (twitchChannel == nullptr)
{
return;
}
@@ -107,7 +109,8 @@ void LogsPopup::getLogviewerLogs()
QJsonValue before = data.value("before");
for (auto i : before.toArray()) {
for (auto i : before.toArray())
{
auto messageObject = i.toObject();
QString message = messageObject.value("text").toString();
@@ -137,7 +140,8 @@ void LogsPopup::getOverrustleLogs()
{
TwitchChannel *twitchChannel =
dynamic_cast<TwitchChannel *>(this->channel_.get());
if (twitchChannel == nullptr) {
if (twitchChannel == nullptr)
{
return;
}
@@ -164,9 +168,11 @@ void LogsPopup::getOverrustleLogs()
req.onSuccess([this, channelName](auto result) -> Outcome {
auto data = result.parseJson();
std::vector<MessagePtr> messages;
if (data.contains("lines")) {
if (data.contains("lines"))
{
QJsonArray dataMessages = data.value("lines").toArray();
for (auto i : dataMessages) {
for (auto i : dataMessages)
{
QJsonObject singleMessage = i.toObject();
QTime timeStamp = QDateTime::fromSecsSinceEpoch(
singleMessage.value("timestamp").toInt())