Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove unnecessary vector in class_loader_utility #15294

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions cyber/class_loader/utility/class_loader_utility.cc
Original file line number Diff line number Diff line change
Expand Up @@ -179,14 +179,13 @@ bool IsLibraryLoaded(const std::string& library_path,
return true;
}

ClassFactoryVector lib_loader_class_factory_objs;
size_t num_lib_loader_class_factory_objs = 0;
for (auto& class_factory_obj : lib_class_factory_objs) {
if (class_factory_obj->IsOwnedBy(class_loader)) {
lib_loader_class_factory_objs.emplace_back(class_factory_obj);
++num_lib_loader_class_factory_objs;
}
}

auto num_lib_loader_class_factory_objs = lib_loader_class_factory_objs.size();
return (is_lib_loaded_by_anyone &&
(num_lib_loader_class_factory_objs <= num_lib_class_factory_objs));
}
Expand Down