summaryrefslogtreecommitdiff
path: root/src/ipa/rkisp1/algorithms/awb.cpp
diff options
context:
space:
mode:
authorBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-04-02 13:37:39 +0200
committerBarnabás Pőcze <barnabas.pocze@ideasonboard.com>2025-05-22 11:22:34 +0200
commitefdbe3969841e342c30dfdced38b6ad9ad55dccf (patch)
treebb86c091f5cf2efcbfc125861383ae7a87bbb929 /src/ipa/rkisp1/algorithms/awb.cpp
parent969df3db3195b43883b6a200bd022ee6c9928042 (diff)
libcamera: controls: Fix `ControlInfoMap::count(unsigned int)`
The two overloads of `find()` and `at()` have the same behaviour regardless of the argument type: `unsigned int` or `const ControlId *`. However, `count()` is not so because `count(unsigned int)` only checks the `ControlIdMap`, and it does not check if the given id is actually present in the map storing the `ControlInfo` objects. So `count()` returns 1 for every control id that is present in the associated `ControlIdMap` regardless of whether there is an actual entry for the `ControlId` associated with the given numeric id. Fix that by simply using `find()` to determine the return value. Fixes: 76b9923e55fd61 ("libcamera: controls: Avoid exception in ControlInfoMap count() and find()") Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
Diffstat (limited to 'src/ipa/rkisp1/algorithms/awb.cpp')
0 files changed, 0 insertions, 0 deletions