diff options
author | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-05 22:01:53 -0400 |
---|---|---|
committer | ouwou <26526779+ouwou@users.noreply.github.com> | 2022-04-05 22:01:53 -0400 |
commit | 49685c39895af67d7ffcc50fdc02150b6ee44f72 (patch) | |
tree | 5c5c262f95a30e58582a285b467d05954ff5f35c /src/components/friendslist.cpp | |
parent | 9767e1e7fdef9262211ec676b4f0d4c30ff10649 (diff) | |
download | abaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.tar.gz abaddon-portaudio-49685c39895af67d7ffcc50fdc02150b6ee44f72.zip |
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
Diffstat (limited to 'src/components/friendslist.cpp')
-rw-r--r-- | src/components/friendslist.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/components/friendslist.cpp b/src/components/friendslist.cpp index 1331d19..b908359 100644 --- a/src/components/friendslist.cpp +++ b/src/components/friendslist.cpp @@ -133,7 +133,7 @@ void FriendsList::OnActionRemove(Snowflake id) { break; } if (Abaddon::Get().ShowConfirm(str, window)) { - const auto cb = [this, window](DiscordError code) { + const auto cb = [window](DiscordError code) { if (code == DiscordError::NONE) return; Gtk::MessageDialog dlg(*window, "Failed to remove user", false, Gtk::MESSAGE_ERROR, Gtk::BUTTONS_OK, true); dlg.set_position(Gtk::WIN_POS_CENTER); @@ -215,7 +215,7 @@ void FriendsListAddComponent::Submit() { if (hashpos == Glib::ustring::npos) return; const auto username = text.substr(0, hashpos); const auto discriminator = text.substr(hashpos + 1); - if (username.size() == 0 || discriminator.size() != 4) return; + if (username.empty() || discriminator.size() != 4) return; if (discriminator.find_first_not_of("0123456789") != Glib::ustring::npos) return; m_requesting = true; @@ -229,7 +229,9 @@ void FriendsListAddComponent::Submit() { m_label.set_text("Failed: "s + GetDiscordErrorDisplayString(code)); } }; - Abaddon::Get().GetDiscordClient().SendFriendRequest(username, std::stoul(discriminator), sigc::track_obj(cb, *this)); + Abaddon::Get().GetDiscordClient().SendFriendRequest(username, + static_cast<int>(std::stoul(discriminator)), + sigc::track_obj(cb, *this)); } bool FriendsListAddComponent::OnKeyPress(GdkEventKey *e) { |