From: Maxim Mamontov Date: Sat, 13 Aug 2011 16:07:49 +0000 (+0300) Subject: GetNum -> Count X-Git-Tag: 2.408-alpha~32 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/0a5045398fd1810d585c00d1e0a6700648c43195?ds=inline;hp=02be813c72c75c61beaef0266bd5adf713e67b42 GetNum -> Count --- diff --git a/projects/stargazer/tariffs_impl.cpp b/projects/stargazer/tariffs_impl.cpp index d2ea7c9a..a912c338 100644 --- a/projects/stargazer/tariffs_impl.cpp +++ b/projects/stargazer/tariffs_impl.cpp @@ -86,7 +86,7 @@ for (int i = 0; i < tariffsNum; i++) return 0; } //----------------------------------------------------------------------------- -int TARIFFS_IMPL::GetTariffsNum() const +size_t TARIFFS_IMPL::Count() const { STG_LOCKER lock(&mutex, __FILE__, __LINE__); return tariffs.size(); diff --git a/projects/stargazer/tariffs_impl.h b/projects/stargazer/tariffs_impl.h index b8aac298..cef5fed7 100644 --- a/projects/stargazer/tariffs_impl.h +++ b/projects/stargazer/tariffs_impl.h @@ -60,7 +60,7 @@ public: int ReadTariffs (); const TARIFF * FindByName(const std::string & name) const; const TARIFF * GetNoTariff() const { return &noTariff; }; - int GetTariffsNum() const; + size_t Count() const; int Del(const std::string & name, const ADMIN * admin); int Add(const std::string & name, const ADMIN * admin); int Chg(const TARIFF_DATA & td, const ADMIN * admin); diff --git a/projects/stargazer/users_impl.cpp b/projects/stargazer/users_impl.cpp index febd90f5..5ad112b9 100644 --- a/projects/stargazer/users_impl.cpp +++ b/projects/stargazer/users_impl.cpp @@ -561,11 +561,6 @@ while (iter != usersToDelete.end()) return; } //----------------------------------------------------------------------------- -int USERS_IMPL::GetUserNum() const -{ -return users.size(); -} -//----------------------------------------------------------------------------- void USERS_IMPL::AddToIPIdx(user_iter user) { printfd(__FILE__, "USERS: Add IP Idx\n"); diff --git a/projects/stargazer/users_impl.h b/projects/stargazer/users_impl.h index 46b17139..4c586b06 100644 --- a/projects/stargazer/users_impl.h +++ b/projects/stargazer/users_impl.h @@ -114,7 +114,7 @@ public: void Del(const std::string & login, const ADMIN * admin); int ReadUsers(); - int GetUserNum() const; + size_t Count() const { return users.size(); } int FindByIPIdx(uint32_t ip, USER_PTR * user) const; int FindByIPIdx(uint32_t ip, USER_IMPL ** user) const;