From c58bec935c3adffac9d99b1675a563d7f2e9ae04 Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 25 Jun 2020 04:23:35 +0300 Subject: libcamera: utils: Add map_keys() function MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a map_keys() function to the utils namespace to extract keys from a map. Signed-off-by: Laurent Pinchart [Niklas: change return type to std::vector instead of std::set] Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by: Jacopo Mondi --- src/libcamera/utils.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/libcamera') diff --git a/src/libcamera/utils.cpp b/src/libcamera/utils.cpp index d55338fe..0567328f 100644 --- a/src/libcamera/utils.cpp +++ b/src/libcamera/utils.cpp @@ -127,6 +127,13 @@ std::string dirname(const std::string &path) return path.substr(0, pos + 1); } +/** + * \fn std::vector map_keys(const T &map) + * \brief Retrieve the keys of a std::map<> + * \param[in] map The map whose keys to retrieve + * \return A std::vector<> containing the keys of \a map + */ + /** * \fn libcamera::utils::set_overlap(InputIt1 first1, InputIt1 last1, * InputIt2 first2, InputIt2 last2) -- cgit v1.2.1