From 0a5045398fd1810d585c00d1e0a6700648c43195 Mon Sep 17 00:00:00 2001 From: Maxim Mamontov Date: Sat, 13 Aug 2011 19:07:49 +0300 Subject: [PATCH] GetNum -> Count --- projects/stargazer/tariffs_impl.cpp | 2 +- projects/stargazer/tariffs_impl.h | 2 +- projects/stargazer/users_impl.cpp | 5 ----- projects/stargazer/users_impl.h | 2 +- 4 files changed, 3 insertions(+), 8 deletions(-) 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; -- 2.44.2