Message ID | 20221018093449.3165709-1-paul.elder@ideasonboard.com |
---|---|
State | Accepted |
Commit | ca247829c3feea28d65b181fd0a5f76ff7120a15 |
Headers | show |
Series |
|
Related | show |
Hi Paul, Thank you for the patch. On Tue, Oct 18, 2022 at 06:34:49PM +0900, Paul Elder via libcamera-devel wrote: > The overloaded deserializers functions that called the main deserializer > function using iterators used cbegin() but end() instead of cend(). Make > all of these use cend() instead. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- > include/libcamera/internal/ipa_data_serializer.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h > index 30bdaebc..54895b87 100644 > --- a/include/libcamera/internal/ipa_data_serializer.h > +++ b/include/libcamera/internal/ipa_data_serializer.h > @@ -134,7 +134,7 @@ public: > > static std::vector<V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), cs); > + return deserialize(data.cbegin(), data.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -142,13 +142,13 @@ public: > ControlSerializer *cs = nullptr) > { > std::vector<SharedFD> fds; > - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); > + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, > ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); > + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -240,7 +240,7 @@ public: > > static std::map<K, V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), cs); > + return deserialize(data.cbegin(), data.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -248,13 +248,13 @@ public: > ControlSerializer *cs = nullptr) > { > std::vector<SharedFD> fds; > - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); > + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, > ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); > + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin,
Hi Paul, On 10/18/22 3:04 PM, Paul Elder via libcamera-devel wrote: > The overloaded deserializers functions that called the main deserializer > function using iterators used cbegin() but end() instead of cend(). Make > all of these use cend() instead. > > Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Umang Jain <umang.jain@ideasonboard.com> > --- > include/libcamera/internal/ipa_data_serializer.h | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h > index 30bdaebc..54895b87 100644 > --- a/include/libcamera/internal/ipa_data_serializer.h > +++ b/include/libcamera/internal/ipa_data_serializer.h > @@ -134,7 +134,7 @@ public: > > static std::vector<V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), cs); > + return deserialize(data.cbegin(), data.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -142,13 +142,13 @@ public: > ControlSerializer *cs = nullptr) > { > std::vector<SharedFD> fds; > - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); > + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, > ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); > + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); > } > > static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -240,7 +240,7 @@ public: > > static std::map<K, V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), cs); > + return deserialize(data.cbegin(), data.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, > @@ -248,13 +248,13 @@ public: > ControlSerializer *cs = nullptr) > { > std::vector<SharedFD> fds; > - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); > + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, > ControlSerializer *cs = nullptr) > { > - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); > + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); > } > > static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin,
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index 30bdaebc..54895b87 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -134,7 +134,7 @@ public: static std::vector<V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) { - return deserialize(data.cbegin(), data.end(), cs); + return deserialize(data.cbegin(), data.cend(), cs); } static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, @@ -142,13 +142,13 @@ public: ControlSerializer *cs = nullptr) { std::vector<SharedFD> fds; - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); } static std::vector<V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, ControlSerializer *cs = nullptr) { - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); } static std::vector<V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, @@ -240,7 +240,7 @@ public: static std::map<K, V> deserialize(std::vector<uint8_t> &data, ControlSerializer *cs = nullptr) { - return deserialize(data.cbegin(), data.end(), cs); + return deserialize(data.cbegin(), data.cend(), cs); } static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin, @@ -248,13 +248,13 @@ public: ControlSerializer *cs = nullptr) { std::vector<SharedFD> fds; - return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.end(), cs); + return deserialize(dataBegin, dataEnd, fds.cbegin(), fds.cend(), cs); } static std::map<K, V> deserialize(std::vector<uint8_t> &data, std::vector<SharedFD> &fds, ControlSerializer *cs = nullptr) { - return deserialize(data.cbegin(), data.end(), fds.cbegin(), fds.end(), cs); + return deserialize(data.cbegin(), data.cend(), fds.cbegin(), fds.cend(), cs); } static std::map<K, V> deserialize(std::vector<uint8_t>::const_iterator dataBegin,
The overloaded deserializers functions that called the main deserializer function using iterators used cbegin() but end() instead of cend(). Make all of these use cend() instead. Signed-off-by: Paul Elder <paul.elder@ideasonboard.com> --- include/libcamera/internal/ipa_data_serializer.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)