/// @brief Prune MRUListMap to the desired length. /// This uses the user-set values for MRU list length. void MRUManager::Prune(std::string const& key, MRUListMap& map) const { size_t limit = 16u; if (options) { auto it = option_names.find(key); if (it != option_names.end()) limit = (size_t)options->Get(it->second)->GetInt(); } map.resize(std::min(limit, map.size())); }
/// @brief Prune MRUListMap to the desired length. /// This uses the user-set values for MRU list length. inline void MRUManager::Prune(MRUListMap& map) { map.resize(std::min(16u, map.size())); }