From: Maxim Mamontov Date: Sun, 13 Nov 2011 20:44:06 +0000 (+0200) Subject: Some code reordering X-Git-Tag: 2.408~51 X-Git-Url: https://git.stg.codes/stg.git/commitdiff_plain/6f011f6e32ce4ac5d3dfb7aaa2c85f71711fd817 Some code reordering --- diff --git a/include/stg/user_ips.h b/include/stg/user_ips.h index 17bb59be..8fada63b 100644 --- a/include/stg/user_ips.h +++ b/include/stg/user_ips.h @@ -134,6 +134,14 @@ return ips.size(); } //----------------------------------------------------------------------------- inline +uint32_t USER_IPS::CalcMask(unsigned int msk) const +{ +if (msk > 32) + return 0; +return htonl(0xFFffFFff << (32 - msk)); +} +//----------------------------------------------------------------------------- +inline bool USER_IPS::IsIPInIPS(uint32_t ip) const { if (ips.empty()) @@ -163,14 +171,6 @@ return false; } //----------------------------------------------------------------------------- inline -uint32_t USER_IPS::CalcMask(unsigned int msk) const -{ -if (msk > 32) - return 0; -return htonl(0xFFffFFff << (32 - msk)); -} -//----------------------------------------------------------------------------- -inline void USER_IPS::Add(const IP_MASK &im) { ips.push_back(im);