From 49685c39895af67d7ffcc50fdc02150b6ee44f72 Mon Sep 17 00:00:00 2001 From: ouwou <26526779+ouwou@users.noreply.github.com> Date: Tue, 5 Apr 2022 22:01:53 -0400 Subject: fix up a bunch of clang-tidy stuff mostly changing references, which i hope doesnt break stuff with models (TreeRow, iterators) since they gave me some strange problems in the past --- src/discord/message.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/discord/message.cpp') diff --git a/src/discord/message.cpp b/src/discord/message.cpp index 93d57c2..fb8a0ad 100644 --- a/src/discord/message.cpp +++ b/src/discord/message.cpp @@ -176,7 +176,7 @@ void to_json(nlohmann::json &j, const MessageApplicationData &m) { j["id"] = m.ID; JS_IF("cover_image", m.CoverImage); j["description"] = m.Description; - if (m.Icon == "") + if (m.Icon.empty()) j["icon"] = nullptr; else j["icon"] = m.Icon; @@ -230,7 +230,7 @@ void Message::from_json_edited(const nlohmann::json &j) { JS_O("content", Content); JS_O("timestamp", Timestamp); JS_ON("edited_timestamp", EditedTimestamp); - if (EditedTimestamp.size() > 0) + if (!EditedTimestamp.empty()) SetEdited(); JS_O("tts", IsTTS); JS_O("mention_everyone", DoesMentionEveryone); -- cgit v1.2.3