osd: use static method and simplify return

Signed-off-by: Noah Watkins <noahwatkins@gmail.com>
This commit is contained in:
Noah Watkins 2016-07-15 12:28:10 -07:00
parent 4025a2eb80
commit 298bc93954
2 changed files with 2 additions and 5 deletions

View File

@ -102,10 +102,7 @@ bool ClassHandler::in_class_list(const std::string& cname,
auto it = std::find_first_of(begin, end, auto it = std::find_first_of(begin, end,
targets.begin(), targets.end()); targets.begin(), targets.end());
if (it == end) return it != end;
return false;
return true;
} }
ClassHandler::ClassData *ClassHandler::_get_class(const string& cname, ClassHandler::ClassData *ClassHandler::_get_class(const string& cname,

View File

@ -106,7 +106,7 @@ private:
ClassData *_get_class(const string& cname, bool check_allowed); ClassData *_get_class(const string& cname, bool check_allowed);
int _load_class(ClassData *cls); int _load_class(ClassData *cls);
bool in_class_list(const std::string& cname, static bool in_class_list(const std::string& cname,
const std::string& list); const std::string& list);
public: public: