diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-16 21:02:52 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2024-11-26 19:05:18 +0200 |
commit | 6089b5bc9429e707e9b535feef6c0d9557622895 (patch) | |
tree | 17356a2e6b5f6c14ccc8c219f6b7741ae368fe89 /src/android/camera_metadata.h | |
parent | d0478c41f432b1c733f7a49ca35614017f3ec33e (diff) |
ipa: libipa: vector: Add mutable x(), y() and z() accessors
The x(), y() and z() functions of the Vector class are convenience
accessors for the first, second and third element of the vector
respectively, meant to improve readability of class users when a vector
represents coordinates in 1D, 2D or 3D space. Those accessors are
limited to immutable access to the vector elements, as they return a
copy. Extend the API with mutable accessors.
The immutable accessors are modified to return a reference to the vector
elements instead of a copy for consistency. As they are inline
functions, this should make no difference in terms of performance as the
compiler can perform the same optimizations in their case.
While at it, reorder functions to declare operators before other member
functions, to be consistent with the usual coding style.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Milan Zamazal <mzamazal@redhat.com>
Diffstat (limited to 'src/android/camera_metadata.h')
0 files changed, 0 insertions, 0 deletions