ros / class_loader

ROS-independent library for dynamic class (i.e. plugin) introspection and loading from runtime libraries
http://www.ros.org/wiki/class_loader
34 stars 95 forks source link

Unnecessary conditional judgment in isLibraryLoaded ? #173

Open daohu527 opened 3 years ago

daohu527 commented 3 years ago

I wonder num_meta_objs_for_lib_bound_to_loader will always less than num_meta_objs_for_lib, because num_meta_objs_for_lib_bound_to_loader is look forward in allMetaObjectsForLibrary(library_path) and

num_meta_objs_for_lib is equal with allMetaObjectsForLibrary(library_path).size()

https://github.com/ros/class_loader/blob/8864be372a83921f15906ae80752be9d6a300b81/src/class_loader_core.cpp#L304-L312

hidmic commented 3 years ago

It'd appear like it, yes. @mjcarroll am I missing anything? Do you recall what was the intent?