Commit 46efce68 authored by Michal 'vorner' Vaner's avatar Michal 'vorner' Vaner

[2433] Remove unnecessary wrapper function

The method can be called by boost::bind directly.
parent 7bea86f9
......@@ -167,7 +167,7 @@ checkNS(const Name& zone_name, const RRClass& zone_class,
checkNSNames(zone_name, zone_class, zone_rrsets, rrset, callbacks);
}
// The following two are simple wrapper of checker callbacks so checkZone()
// The following is a simple wrapper of checker callback so checkZone()
// can also remember any critical errors.
void
errorWrapper(const string& reason, const ZoneCheckerCallbacks* callbacks,
......@@ -175,11 +175,6 @@ errorWrapper(const string& reason, const ZoneCheckerCallbacks* callbacks,
*had_error = true;
callbacks->error(reason);
}
void
warnWrapper(const string& reason, const ZoneCheckerCallbacks* callbacks) {
callbacks->warn(reason);
}
}
bool
......@@ -189,7 +184,7 @@ checkZone(const Name& zone_name, const RRClass& zone_class,
bool had_error = false;
ZoneCheckerCallbacks my_callbacks(
boost::bind(errorWrapper, _1, &callbacks, &had_error),
boost::bind(warnWrapper, _1, &callbacks));
boost::bind(&ZoneCheckerCallbacks::warn, &callbacks, _1));
checkSOA(zone_name, zone_class, zone_rrsets, my_callbacks);
checkNS(zone_name, zone_class, zone_rrsets, my_callbacks);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment