don't use std::function in flatbuffers::Parser (#4995)
std::function makes code harder to debug because it requires stepping through a separate destructor and call operator. It's use unnecessary in the Parser since the functions taking functors are private and are only used within idl_parser.cpp. Therefore the definitions can stay in idl_parser.cpp as well. Only care must be taken that the definitions appear before use but that's already true and all compilers will complain equally if it get's violated. This change might also improve performance since it might allow inlining where it wasn't possible before but I haven't measured that.
Showing
This diff is collapsed.
Please
register
or
sign in
to comment