mirror of
https://github.com/wesnoth/wesnoth
synced 2025-05-13 01:32:39 +00:00
Removed unused function banned_compare_subnet::set_use_subnet_mask.
This commit is contained in:
parent
d098312cfe
commit
001f868d21
@ -52,20 +52,6 @@ static lg::log_domain log_server("server");
|
||||
|
||||
banned_compare_subnet::compare_fn banned_compare_subnet::active_ = &banned_compare_subnet::less;
|
||||
|
||||
void banned_compare_subnet::set_use_subnet_mask(bool use)
|
||||
{
|
||||
if (use)
|
||||
{
|
||||
assert(active_ == &banned_compare_subnet::less);
|
||||
active_ = &banned_compare_subnet::less_with_subnet;
|
||||
}
|
||||
else
|
||||
{
|
||||
assert(active_ != &banned_compare_subnet::less);
|
||||
active_ = &banned_compare_subnet::less;
|
||||
}
|
||||
}
|
||||
|
||||
bool banned_compare_subnet::operator()(const banned_ptr& a, const banned_ptr& b) const
|
||||
{
|
||||
return (this->*(active_))(a,b);
|
||||
@ -76,11 +62,6 @@ static lg::log_domain log_server("server");
|
||||
return a->get_int_ip() < b->get_int_ip();
|
||||
}
|
||||
|
||||
bool banned_compare_subnet::less_with_subnet(const banned_ptr& a, const banned_ptr& b) const
|
||||
{
|
||||
return a->get_mask_ip(b->mask()) < b->get_mask_ip(a->mask());
|
||||
}
|
||||
|
||||
const std::string banned::who_banned_default_ = "system";
|
||||
|
||||
banned_ptr banned::create_dummy(const std::string& ip)
|
||||
|
@ -43,9 +43,7 @@ namespace wesnothd {
|
||||
struct banned_compare_subnet {
|
||||
bool operator()(const banned_ptr& a, const banned_ptr& b) const;
|
||||
private:
|
||||
static void set_use_subnet_mask(bool);
|
||||
bool less(const banned_ptr& a, const banned_ptr& b) const;
|
||||
bool less_with_subnet(const banned_ptr& a, const banned_ptr& b) const;
|
||||
typedef bool (banned_compare_subnet::*compare_fn)(const banned_ptr& a, const banned_ptr& b) const;
|
||||
static compare_fn active_;
|
||||
};
|
||||
|
Loading…
x
Reference in New Issue
Block a user