| Message ID | 20260212151238.3736234-4-laurent.pinchart@ideasonboard.com |
|---|---|
| State | Accepted |
| Headers | show |
| Series |
|
| Related | show |
2026. 02. 12. 16:12 keltezéssel, Laurent Pinchart írta: > Using the name `it` for a variable that is not an iterator is confusing. > Give the variable a more explanatory name. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > --- Reviewed-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> > include/libcamera/internal/ipa_data_serializer.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h > index 61bada52f691..0dda76d5b1d1 100644 > --- a/include/libcamera/internal/ipa_data_serializer.h > +++ b/include/libcamera/internal/ipa_data_serializer.h > @@ -114,12 +114,12 @@ public: > appendPOD<uint32_t>(dataVec, vecLen); > > /* Serialize the members. */ > - for (auto const &it : data) { > + for (const auto &value : data) { > std::vector<uint8_t> dvec; > std::vector<SharedFD> fvec; > > std::tie(dvec, fvec) = > - IPADataSerializer<V>::serialize(it, cs); > + IPADataSerializer<V>::serialize(value, cs); > > appendPOD<uint32_t>(dataVec, dvec.size()); > appendPOD<uint32_t>(dataVec, fvec.size());
Hi Laurent, Quoting Laurent Pinchart (2026-02-12 15:12:37) > Using the name `it` for a variable that is not an iterator is confusing. > Give the variable a more explanatory name. > > Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Isaac Scott <isaac.scott@ideasonboard.com> > --- > include/libcamera/internal/ipa_data_serializer.h | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h > index 61bada52f691..0dda76d5b1d1 100644 > --- a/include/libcamera/internal/ipa_data_serializer.h > +++ b/include/libcamera/internal/ipa_data_serializer.h > @@ -114,12 +114,12 @@ public: > appendPOD<uint32_t>(dataVec, vecLen); > > /* Serialize the members. */ > - for (auto const &it : data) { > + for (const auto &value : data) { > std::vector<uint8_t> dvec; > std::vector<SharedFD> fvec; > > std::tie(dvec, fvec) = > - IPADataSerializer<V>::serialize(it, cs); > + IPADataSerializer<V>::serialize(value, cs); > > appendPOD<uint32_t>(dataVec, dvec.size()); > appendPOD<uint32_t>(dataVec, fvec.size()); > -- > Regards, > > Laurent Pinchart >
diff --git a/include/libcamera/internal/ipa_data_serializer.h b/include/libcamera/internal/ipa_data_serializer.h index 61bada52f691..0dda76d5b1d1 100644 --- a/include/libcamera/internal/ipa_data_serializer.h +++ b/include/libcamera/internal/ipa_data_serializer.h @@ -114,12 +114,12 @@ public: appendPOD<uint32_t>(dataVec, vecLen); /* Serialize the members. */ - for (auto const &it : data) { + for (const auto &value : data) { std::vector<uint8_t> dvec; std::vector<SharedFD> fvec; std::tie(dvec, fvec) = - IPADataSerializer<V>::serialize(it, cs); + IPADataSerializer<V>::serialize(value, cs); appendPOD<uint32_t>(dataVec, dvec.size()); appendPOD<uint32_t>(dataVec, fvec.size());
Using the name `it` for a variable that is not an iterator is confusing. Give the variable a more explanatory name. Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> --- include/libcamera/internal/ipa_data_serializer.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)