diff options
| author | 2026-04-04 12:10:50 +0100 | |
|---|---|---|
| committer | 2026-04-04 12:32:00 +0100 | |
| commit | ef7c6fe9e2bfb22de66808e56a5f5bd602c3086f (patch) | |
| tree | 96f67982d63c354a33295997c828fb79462120e6 /modules/monitor.cpp | |
| parent | Rename utility/map to container and prefix the difference method. (diff) | |
Remove the remaining bits of stdalgo to utility/container.
Diffstat (limited to 'modules/monitor.cpp')
| -rw-r--r-- | modules/monitor.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/modules/monitor.cpp b/modules/monitor.cpp index 34b58c989..d0307f54f 100644 --- a/modules/monitor.cpp +++ b/modules/monitor.cpp @@ -26,6 +26,7 @@ #include "modules/monitor.h" #include "numericbuilder.h" #include "stringutils.h" +#include "utility/container.h" namespace IRCv3::Monitor { @@ -129,7 +130,7 @@ public: return WR_TOOMANY; Entry* entry = AddWatcher(nick, user); - if (stdalgo::isin(*watched, entry)) + if (insp::contains(*watched, entry)) return WR_ALREADYWATCHING; entry->watchers.push_back(user); @@ -209,11 +210,11 @@ private: Entry& entry = it->second; // Erase from the user's list of watched nicks - if (!stdalgo::vector::swaperase(watchedlist, &entry)) + if (!insp::swap_erase(watchedlist, &entry)) return false; // User is not watching this nick // Erase from the nick's list of watching users - stdalgo::vector::swaperase(entry.watchers, user); + insp::swap_erase(entry.watchers, user); // If nobody else is watching the nick remove map entry if (entry.watchers.empty()) |
