-
Couldn't load subscription status.
- Fork 3.2k
Description
The documentation of Conf::dump() method does not mention that the caller must deallocate the heap-allocated list returned by the function.
The documentation also says the function is returning "tuples". If that were true, maybe the function signature should be:
virtual std::list<std::tuple<std::string, std::string>> *dump() = 0;
OR better:
virtual std::list<std::pair<std::string, std::string>> *dump() = 0;
Anyway, the documentation should say that every odd list item is a configuration parameter name (the key) and every even list item is the value for the preceding configuration parameter name.
An enhancement idea: Create a dump() method overload that returns nothing but accepts a reference to a list.