1
0
Эх сурвалжийг харах

FillUsers(nick) is deadcode

Bryan Drewery 7 жил өмнө
parent
commit
1cceb3999f
2 өөрчлөгдсөн 4 нэмэгдсэн , 9 устгасан
  1. 3 8
      src/auth.cc
  2. 1 1
      src/auth.h

+ 3 - 8
src/auth.cc

@@ -133,15 +133,10 @@ static void auth_fill_users_block(const bd::String& key, Auth* auth)
   auth->user = get_user_by_host(from);
 }
 
-void Auth::FillUsers(const char *nick) noexcept
+void Auth::FillUsers(void) noexcept
 {
-  if (nick == NULL) {
-    for (auto& kv : ht_host) {
-      auth_fill_users_block(kv.first, kv.second);
-    }
-  } else if (ht_nick.contains(nick)) {
-    Auth *auth = ht_nick[nick];
-    auth_fill_users_block(nick, auth);
+  for (auto& kv : ht_host) {
+    auth_fill_users_block(kv.first, kv.second);
   }
 }
 

+ 1 - 1
src/auth.h

@@ -37,7 +37,7 @@ class Auth {
   static Auth *Find(const char * host) noexcept __attribute__((pure));
   static void NullUsers(const RfcString&) noexcept;
   static void NullUsers(void) noexcept;
-  static void FillUsers(const char *nick = NULL) noexcept;
+  static void FillUsers(void) noexcept;
   static void ExpireAuths() noexcept;
   static void InitTimer() noexcept;
   static void DeleteAll() noexcept;