[{"id":2901,"web_url":"https://patchwork.libcamera.org/comment/2901/","msgid":"<20191015002823.GG5976@bigcity.dyn.berto.se>","date":"2019-10-15T00:28:23","subject":"Re: [libcamera-devel] [PATCH 07/10] libcamera: v4l2_controls: Store\n\ta ControlRange in V4L2ControlInfoMap","submitter":{"id":5,"url":"https://patchwork.libcamera.org/api/people/5/","name":"Niklas Söderlund","email":"niklas.soderlund@ragnatech.se"},"content":"Hi Laurent,\n\nThanks for your work.\n\nOn 2019-10-14 02:27:53 +0300, Laurent Pinchart wrote:\n> V4L2ControlRange only offers a convenience constructor for a\n> ControlRange. Store the ControlRange instead of V4L2ControlRange in\n> V4L2ControlInfoMap to make the map less dependent on V4L2 types.\n> \n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nReviewed-by: Niklas Söderlund <niklas.soderlund@ragnatech.se>\n\n> ---\n>  src/libcamera/include/v4l2_controls.h | 34 +++++++++++++--------------\n>  src/libcamera/pipeline/uvcvideo.cpp   |  2 +-\n>  src/libcamera/pipeline/vimc.cpp       |  2 +-\n>  src/libcamera/v4l2_controls.cpp       |  6 ++---\n>  src/libcamera/v4l2_device.cpp         |  6 ++---\n>  test/v4l2_videodevice/controls.cpp    |  6 ++---\n>  6 files changed, 27 insertions(+), 29 deletions(-)\n> \n> diff --git a/src/libcamera/include/v4l2_controls.h b/src/libcamera/include/v4l2_controls.h\n> index 741569824b68..7d3528b07f94 100644\n> --- a/src/libcamera/include/v4l2_controls.h\n> +++ b/src/libcamera/include/v4l2_controls.h\n> @@ -31,27 +31,27 @@ public:\n>  \tV4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl);\n>  };\n>  \n> -class V4L2ControlInfoMap : private std::map<const ControlId *, V4L2ControlRange>\n> +class V4L2ControlInfoMap : private std::map<const ControlId *, ControlRange>\n>  {\n>  public:\n> -\tV4L2ControlInfoMap &operator=(std::map<const ControlId *, V4L2ControlRange> &&info);\n> +\tV4L2ControlInfoMap &operator=(std::map<const ControlId *, ControlRange> &&info);\n>  \n> -\tusing std::map<const ControlId *, V4L2ControlRange>::key_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::mapped_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::value_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::size_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::iterator;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::const_iterator;\n> +\tusing std::map<const ControlId *, ControlRange>::key_type;\n> +\tusing std::map<const ControlId *, ControlRange>::mapped_type;\n> +\tusing std::map<const ControlId *, ControlRange>::value_type;\n> +\tusing std::map<const ControlId *, ControlRange>::size_type;\n> +\tusing std::map<const ControlId *, ControlRange>::iterator;\n> +\tusing std::map<const ControlId *, ControlRange>::const_iterator;\n>  \n> -\tusing std::map<const ControlId *, V4L2ControlRange>::begin;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::cbegin;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::end;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::cend;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::at;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::empty;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::size;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::count;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::find;\n> +\tusing std::map<const ControlId *, ControlRange>::begin;\n> +\tusing std::map<const ControlId *, ControlRange>::cbegin;\n> +\tusing std::map<const ControlId *, ControlRange>::end;\n> +\tusing std::map<const ControlId *, ControlRange>::cend;\n> +\tusing std::map<const ControlId *, ControlRange>::at;\n> +\tusing std::map<const ControlId *, ControlRange>::empty;\n> +\tusing std::map<const ControlId *, ControlRange>::size;\n> +\tusing std::map<const ControlId *, ControlRange>::count;\n> +\tusing std::map<const ControlId *, ControlRange>::find;\n>  \n>  \tmapped_type &at(unsigned int key);\n>  \tconst mapped_type &at(unsigned int key) const;\n> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> index 7356585b982e..018c7691d263 100644\n> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> @@ -337,7 +337,7 @@ int UVCCameraData::init(MediaEntity *entity)\n>  \t/* Initialise the supported controls. */\n>  \tconst V4L2ControlInfoMap &controls = video_->controls();\n>  \tfor (const auto &ctrl : controls) {\n> -\t\tconst V4L2ControlRange &range = ctrl.second;\n> +\t\tconst ControlRange &range = ctrl.second;\n>  \t\tconst ControlId *id;\n>  \n>  \t\tswitch (ctrl.first->id()) {\n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index 87e7e54e964f..f7f82edc6530 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -413,7 +413,7 @@ int VimcCameraData::init(MediaDevice *media)\n>  \t/* Initialise the supported controls. */\n>  \tconst V4L2ControlInfoMap &controls = sensor_->controls();\n>  \tfor (const auto &ctrl : controls) {\n> -\t\tconst V4L2ControlRange &range = ctrl.second;\n> +\t\tconst ControlRange &range = ctrl.second;\n>  \t\tconst ControlId *id;\n>  \n>  \t\tswitch (ctrl.first->id()) {\n> diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp\n> index 4aab34b9a2b4..e27c70eeec87 100644\n> --- a/src/libcamera/v4l2_controls.cpp\n> +++ b/src/libcamera/v4l2_controls.cpp\n> @@ -136,7 +136,7 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl)\n>  \n>  /**\n>   * \\class V4L2ControlInfoMap\n> - * \\brief A map of controlID to V4L2ControlRange\n> + * \\brief A map of controlID to ControlRange for V4L2 controls\n>   */\n>  \n>  /**\n> @@ -150,9 +150,9 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl)\n>   *\n>   * \\return The populated V4L2ControlInfoMap\n>   */\n> -V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<const ControlId *, V4L2ControlRange> &&info)\n> +V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<const ControlId *, ControlRange> &&info)\n>  {\n> -\tstd::map<const ControlId *, V4L2ControlRange>::operator=(std::move(info));\n> +\tstd::map<const ControlId *, ControlRange>::operator=(std::move(info));\n>  \n>  \tidmap_.clear();\n>  \tfor (const auto &ctrl : *this)\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 133f8abc8f13..47999e70073c 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -342,7 +342,7 @@ int V4L2Device::ioctl(unsigned long request, void *argp)\n>   */\n>  void V4L2Device::listControls()\n>  {\n> -\tstd::map<const ControlId *, V4L2ControlRange> ctrls;\n> +\tstd::map<const ControlId *, ControlRange> ctrls;\n>  \tstruct v4l2_query_ext_ctrl ctrl = {};\n>  \n>  \t/* \\todo Add support for menu and compound controls. */\n> @@ -380,9 +380,7 @@ void V4L2Device::listControls()\n>  \t\t}\n>  \n>  \t\tcontrolIds_.emplace_back(utils::make_unique<V4L2ControlId>(ctrl));\n> -\t\tctrls.emplace(std::piecewise_construct,\n> -\t\t\t      std::forward_as_tuple(controlIds_.back().get()),\n> -\t\t\t      std::forward_as_tuple(ctrl));\n> +\t\tctrls.emplace(controlIds_.back().get(), V4L2ControlRange(ctrl));\n>  \t}\n>  \n>  \tcontrols_ = std::move(ctrls);\n> diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp\n> index d4b7588eb362..182228f3a5b1 100644\n> --- a/test/v4l2_videodevice/controls.cpp\n> +++ b/test/v4l2_videodevice/controls.cpp\n> @@ -41,9 +41,9 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>  \n> -\t\tconst V4L2ControlRange &brightness = info.find(V4L2_CID_BRIGHTNESS)->second;\n> -\t\tconst V4L2ControlRange &contrast = info.find(V4L2_CID_CONTRAST)->second;\n> -\t\tconst V4L2ControlRange &saturation = info.find(V4L2_CID_SATURATION)->second;\n> +\t\tconst ControlRange &brightness = info.find(V4L2_CID_BRIGHTNESS)->second;\n> +\t\tconst ControlRange &contrast = info.find(V4L2_CID_CONTRAST)->second;\n> +\t\tconst ControlRange &saturation = info.find(V4L2_CID_SATURATION)->second;\n>  \n>  \t\t/* Test getting controls. */\n>  \t\tV4L2ControlList ctrls(info);\n> -- \n> Regards,\n> \n> Laurent Pinchart\n> \n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<niklas.soderlund@ragnatech.se>","Received":["from mail-lf1-x141.google.com (mail-lf1-x141.google.com\n\t[IPv6:2a00:1450:4864:20::141])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 45AF5600F9\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Oct 2019 02:28:25 +0200 (CEST)","by mail-lf1-x141.google.com with SMTP id q12so13025314lfc.11\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tMon, 14 Oct 2019 17:28:25 -0700 (PDT)","from localhost (h-93-159.A463.priv.bahnhof.se. [46.59.93.159])\n\tby smtp.gmail.com with ESMTPSA id\n\th12sm4489421ljg.24.2019.10.14.17.28.23\n\t(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);\n\tMon, 14 Oct 2019 17:28:23 -0700 (PDT)"],"DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=ragnatech-se.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=mO7M42KknuoDDPuPolw43WevFunHaaU83jP9yx+ddp0=;\n\tb=LQ7WXZEYbikm5c91PGkw3auECSqoCFlcSJSiex/BGm40iqyAP9aMmH8tZo6Az6AAfK\n\tVdRDP1LeAFo2OGMXIWoHANTGvPO/pL858Qd1JDA9K65i3AGZoJKYgfbkC4MXwS+mEV0+\n\tmaFZY1jInjdP9BVUJZBmHXEHez+cw44XBwcqVwYLLg1eL6E/E+ckJDIV1bPGGjV+Dy2r\n\tpfMrwPIjZPKEzpeMF9xhjFbS9vP6fPbAAU3mJiCPgBPXjJXWvVf1pRlndxvXL5dIg7H3\n\tdaNf69oFDdOH0MRWAADs0lYR6FL1qSznnykOER2C/5GTMVNe/JyrZdTQC2Gda9w0FrFe\n\tZbzg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=mO7M42KknuoDDPuPolw43WevFunHaaU83jP9yx+ddp0=;\n\tb=X94E2BQgZkSFbt4nXt4EM1AaUuf1np30gk4ImfsHaehNYNPBD7KaC/lEcxSm3tDYzb\n\tfB7+2WhbJB9WPvE7to2HG+4KGIkhZ/DEauSt5VkBc/Wg1jXKfIjXxtFS6JfPIfcdl/Qz\n\tUMkHMzleCsqaxuBRTFD+tb7jqxm0SHGE5rK3n9ILdzJ+3vus+jNqegQa0ILHIHn9X7ZT\n\t7A8DZy2h16Kb6IL+XkOB/4SFZmCE0tTLuzKxchDXHWNU7PMh2HqhsiQv1Q2rq7lkdXCv\n\tX2/LsqzAxwFnrmbySGCkIGFNUx6BJLIxVhbdwxK/EZJG8y6FKs1+6CPg60Lj+ZaUyFtb\n\tqNjQ==","X-Gm-Message-State":"APjAAAW1T9SMqEpI07MX6erTn8IKBoa8A7y8dQ9K+4ifPPjMcH9HDYyT\n\tynU8byIKcEJs8y3mmoxrOv9qvQ==","X-Google-Smtp-Source":"APXvYqze4YssO2RaZcC8u8e/OnweHW5GNaakXdmdmXhhXOCJ2vbbcS6s253YXLpRMBZS6EeY9GHV3Q==","X-Received":"by 2002:ac2:47f1:: with SMTP id\n\tb17mr17266273lfp.31.1571099304663; \n\tMon, 14 Oct 2019 17:28:24 -0700 (PDT)","Date":"Tue, 15 Oct 2019 02:28:23 +0200","From":"Niklas =?iso-8859-1?q?S=F6derlund?= <niklas.soderlund@ragnatech.se>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191015002823.GG5976@bigcity.dyn.berto.se>","References":"<20191013232755.3292-1-laurent.pinchart@ideasonboard.com>\n\t<20191013232755.3292-8-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"text/plain; charset=iso-8859-1","Content-Disposition":"inline","Content-Transfer-Encoding":"8bit","In-Reply-To":"<20191013232755.3292-8-laurent.pinchart@ideasonboard.com>","User-Agent":"Mutt/1.12.1 (2019-06-15)","Subject":"Re: [libcamera-devel] [PATCH 07/10] libcamera: v4l2_controls: Store\n\ta ControlRange in V4L2ControlInfoMap","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 15 Oct 2019 00:28:25 -0000"}},{"id":2920,"web_url":"https://patchwork.libcamera.org/comment/2920/","msgid":"<20191015175954.qzqf74cgw3u3zkhh@uno.localdomain>","date":"2019-10-15T17:59:54","subject":"Re: [libcamera-devel] [PATCH 07/10] libcamera: v4l2_controls: Store\n\ta ControlRange in V4L2ControlInfoMap","submitter":{"id":3,"url":"https://patchwork.libcamera.org/api/people/3/","name":"Jacopo Mondi","email":"jacopo@jmondi.org"},"content":"Hi Laurent,\n\nOn Mon, Oct 14, 2019 at 02:27:53AM +0300, Laurent Pinchart wrote:\n> V4L2ControlRange only offers a convenience constructor for a\n> ControlRange. Store the ControlRange instead of V4L2ControlRange in\n> V4L2ControlInfoMap to make the map less dependent on V4L2 types.\n>\n> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>\n\nLooks good!\n\nReviewed-by: Jacopo Mondi <jacopo@jmondi.org>\n\nThanks\n   j\n\n> ---\n>  src/libcamera/include/v4l2_controls.h | 34 +++++++++++++--------------\n>  src/libcamera/pipeline/uvcvideo.cpp   |  2 +-\n>  src/libcamera/pipeline/vimc.cpp       |  2 +-\n>  src/libcamera/v4l2_controls.cpp       |  6 ++---\n>  src/libcamera/v4l2_device.cpp         |  6 ++---\n>  test/v4l2_videodevice/controls.cpp    |  6 ++---\n>  6 files changed, 27 insertions(+), 29 deletions(-)\n>\n> diff --git a/src/libcamera/include/v4l2_controls.h b/src/libcamera/include/v4l2_controls.h\n> index 741569824b68..7d3528b07f94 100644\n> --- a/src/libcamera/include/v4l2_controls.h\n> +++ b/src/libcamera/include/v4l2_controls.h\n> @@ -31,27 +31,27 @@ public:\n>  \tV4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl);\n>  };\n>\n> -class V4L2ControlInfoMap : private std::map<const ControlId *, V4L2ControlRange>\n> +class V4L2ControlInfoMap : private std::map<const ControlId *, ControlRange>\n>  {\n>  public:\n> -\tV4L2ControlInfoMap &operator=(std::map<const ControlId *, V4L2ControlRange> &&info);\n> +\tV4L2ControlInfoMap &operator=(std::map<const ControlId *, ControlRange> &&info);\n>\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::key_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::mapped_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::value_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::size_type;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::iterator;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::const_iterator;\n> +\tusing std::map<const ControlId *, ControlRange>::key_type;\n> +\tusing std::map<const ControlId *, ControlRange>::mapped_type;\n> +\tusing std::map<const ControlId *, ControlRange>::value_type;\n> +\tusing std::map<const ControlId *, ControlRange>::size_type;\n> +\tusing std::map<const ControlId *, ControlRange>::iterator;\n> +\tusing std::map<const ControlId *, ControlRange>::const_iterator;\n>\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::begin;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::cbegin;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::end;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::cend;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::at;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::empty;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::size;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::count;\n> -\tusing std::map<const ControlId *, V4L2ControlRange>::find;\n> +\tusing std::map<const ControlId *, ControlRange>::begin;\n> +\tusing std::map<const ControlId *, ControlRange>::cbegin;\n> +\tusing std::map<const ControlId *, ControlRange>::end;\n> +\tusing std::map<const ControlId *, ControlRange>::cend;\n> +\tusing std::map<const ControlId *, ControlRange>::at;\n> +\tusing std::map<const ControlId *, ControlRange>::empty;\n> +\tusing std::map<const ControlId *, ControlRange>::size;\n> +\tusing std::map<const ControlId *, ControlRange>::count;\n> +\tusing std::map<const ControlId *, ControlRange>::find;\n>\n>  \tmapped_type &at(unsigned int key);\n>  \tconst mapped_type &at(unsigned int key) const;\n> diff --git a/src/libcamera/pipeline/uvcvideo.cpp b/src/libcamera/pipeline/uvcvideo.cpp\n> index 7356585b982e..018c7691d263 100644\n> --- a/src/libcamera/pipeline/uvcvideo.cpp\n> +++ b/src/libcamera/pipeline/uvcvideo.cpp\n> @@ -337,7 +337,7 @@ int UVCCameraData::init(MediaEntity *entity)\n>  \t/* Initialise the supported controls. */\n>  \tconst V4L2ControlInfoMap &controls = video_->controls();\n>  \tfor (const auto &ctrl : controls) {\n> -\t\tconst V4L2ControlRange &range = ctrl.second;\n> +\t\tconst ControlRange &range = ctrl.second;\n>  \t\tconst ControlId *id;\n>\n>  \t\tswitch (ctrl.first->id()) {\n> diff --git a/src/libcamera/pipeline/vimc.cpp b/src/libcamera/pipeline/vimc.cpp\n> index 87e7e54e964f..f7f82edc6530 100644\n> --- a/src/libcamera/pipeline/vimc.cpp\n> +++ b/src/libcamera/pipeline/vimc.cpp\n> @@ -413,7 +413,7 @@ int VimcCameraData::init(MediaDevice *media)\n>  \t/* Initialise the supported controls. */\n>  \tconst V4L2ControlInfoMap &controls = sensor_->controls();\n>  \tfor (const auto &ctrl : controls) {\n> -\t\tconst V4L2ControlRange &range = ctrl.second;\n> +\t\tconst ControlRange &range = ctrl.second;\n>  \t\tconst ControlId *id;\n>\n>  \t\tswitch (ctrl.first->id()) {\n> diff --git a/src/libcamera/v4l2_controls.cpp b/src/libcamera/v4l2_controls.cpp\n> index 4aab34b9a2b4..e27c70eeec87 100644\n> --- a/src/libcamera/v4l2_controls.cpp\n> +++ b/src/libcamera/v4l2_controls.cpp\n> @@ -136,7 +136,7 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl)\n>\n>  /**\n>   * \\class V4L2ControlInfoMap\n> - * \\brief A map of controlID to V4L2ControlRange\n> + * \\brief A map of controlID to ControlRange for V4L2 controls\n>   */\n>\n>  /**\n> @@ -150,9 +150,9 @@ V4L2ControlRange::V4L2ControlRange(const struct v4l2_query_ext_ctrl &ctrl)\n>   *\n>   * \\return The populated V4L2ControlInfoMap\n>   */\n> -V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<const ControlId *, V4L2ControlRange> &&info)\n> +V4L2ControlInfoMap &V4L2ControlInfoMap::operator=(std::map<const ControlId *, ControlRange> &&info)\n>  {\n> -\tstd::map<const ControlId *, V4L2ControlRange>::operator=(std::move(info));\n> +\tstd::map<const ControlId *, ControlRange>::operator=(std::move(info));\n>\n>  \tidmap_.clear();\n>  \tfor (const auto &ctrl : *this)\n> diff --git a/src/libcamera/v4l2_device.cpp b/src/libcamera/v4l2_device.cpp\n> index 133f8abc8f13..47999e70073c 100644\n> --- a/src/libcamera/v4l2_device.cpp\n> +++ b/src/libcamera/v4l2_device.cpp\n> @@ -342,7 +342,7 @@ int V4L2Device::ioctl(unsigned long request, void *argp)\n>   */\n>  void V4L2Device::listControls()\n>  {\n> -\tstd::map<const ControlId *, V4L2ControlRange> ctrls;\n> +\tstd::map<const ControlId *, ControlRange> ctrls;\n>  \tstruct v4l2_query_ext_ctrl ctrl = {};\n>\n>  \t/* \\todo Add support for menu and compound controls. */\n> @@ -380,9 +380,7 @@ void V4L2Device::listControls()\n>  \t\t}\n>\n>  \t\tcontrolIds_.emplace_back(utils::make_unique<V4L2ControlId>(ctrl));\n> -\t\tctrls.emplace(std::piecewise_construct,\n> -\t\t\t      std::forward_as_tuple(controlIds_.back().get()),\n> -\t\t\t      std::forward_as_tuple(ctrl));\n> +\t\tctrls.emplace(controlIds_.back().get(), V4L2ControlRange(ctrl));\n>  \t}\n>\n>  \tcontrols_ = std::move(ctrls);\n> diff --git a/test/v4l2_videodevice/controls.cpp b/test/v4l2_videodevice/controls.cpp\n> index d4b7588eb362..182228f3a5b1 100644\n> --- a/test/v4l2_videodevice/controls.cpp\n> +++ b/test/v4l2_videodevice/controls.cpp\n> @@ -41,9 +41,9 @@ protected:\n>  \t\t\treturn TestFail;\n>  \t\t}\n>\n> -\t\tconst V4L2ControlRange &brightness = info.find(V4L2_CID_BRIGHTNESS)->second;\n> -\t\tconst V4L2ControlRange &contrast = info.find(V4L2_CID_CONTRAST)->second;\n> -\t\tconst V4L2ControlRange &saturation = info.find(V4L2_CID_SATURATION)->second;\n> +\t\tconst ControlRange &brightness = info.find(V4L2_CID_BRIGHTNESS)->second;\n> +\t\tconst ControlRange &contrast = info.find(V4L2_CID_CONTRAST)->second;\n> +\t\tconst ControlRange &saturation = info.find(V4L2_CID_SATURATION)->second;\n>\n>  \t\t/* Test getting controls. */\n>  \t\tV4L2ControlList ctrls(info);\n> --\n> Regards,\n>\n> Laurent Pinchart\n>\n> _______________________________________________\n> libcamera-devel mailing list\n> libcamera-devel@lists.libcamera.org\n> https://lists.libcamera.org/listinfo/libcamera-devel","headers":{"Return-Path":"<jacopo@jmondi.org>","Received":["from relay11.mail.gandi.net (relay11.mail.gandi.net\n\t[217.70.178.231])\n\tby lancelot.ideasonboard.com (Postfix) with ESMTPS id 25B8C61562\n\tfor <libcamera-devel@lists.libcamera.org>;\n\tTue, 15 Oct 2019 19:58:06 +0200 (CEST)","from uno.localdomain (2-224-242-101.ip172.fastwebnet.it\n\t[2.224.242.101]) (Authenticated sender: jacopo@jmondi.org)\n\tby relay11.mail.gandi.net (Postfix) with ESMTPSA id BC961100008;\n\tTue, 15 Oct 2019 17:58:05 +0000 (UTC)"],"Date":"Tue, 15 Oct 2019 19:59:54 +0200","From":"Jacopo Mondi <jacopo@jmondi.org>","To":"Laurent Pinchart <laurent.pinchart@ideasonboard.com>","Cc":"libcamera-devel@lists.libcamera.org","Message-ID":"<20191015175954.qzqf74cgw3u3zkhh@uno.localdomain>","References":"<20191013232755.3292-1-laurent.pinchart@ideasonboard.com>\n\t<20191013232755.3292-8-laurent.pinchart@ideasonboard.com>","MIME-Version":"1.0","Content-Type":"multipart/signed; micalg=pgp-sha256;\n\tprotocol=\"application/pgp-signature\"; boundary=\"kwqaipbbdjaclelp\"","Content-Disposition":"inline","In-Reply-To":"<20191013232755.3292-8-laurent.pinchart@ideasonboard.com>","User-Agent":"NeoMutt/20180716","Subject":"Re: [libcamera-devel] [PATCH 07/10] libcamera: v4l2_controls: Store\n\ta ControlRange in V4L2ControlInfoMap","X-BeenThere":"libcamera-devel@lists.libcamera.org","X-Mailman-Version":"2.1.29","Precedence":"list","List-Id":"<libcamera-devel.lists.libcamera.org>","List-Unsubscribe":"<https://lists.libcamera.org/options/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=unsubscribe>","List-Archive":"<https://lists.libcamera.org/pipermail/libcamera-devel/>","List-Post":"<mailto:libcamera-devel@lists.libcamera.org>","List-Help":"<mailto:libcamera-devel-request@lists.libcamera.org?subject=help>","List-Subscribe":"<https://lists.libcamera.org/listinfo/libcamera-devel>,\n\t<mailto:libcamera-devel-request@lists.libcamera.org?subject=subscribe>","X-List-Received-Date":"Tue, 15 Oct 2019 17:58:06 -0000"}}]