Message ID | 20241220150759.709756-8-pobrn@protonmail.com |
---|---|
State | Superseded |
Headers | show |
Series |
|
Related | show |
Hi Barnabás On Fri, Dec 20, 2024 at 03:08:33PM +0000, Barnabás Pőcze wrote: > There is no reason to use `std::vector` for this static > data, a simple array will do fine. > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> GTest provides overloads of ValuesIn for both raw arrays and containers. So this certainly doesn't hurt. Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> > --- > src/apps/lc-compliance/tests/capture_test.cpp | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp > index db196a949..97465a612 100644 > --- a/src/apps/lc-compliance/tests/capture_test.cpp > +++ b/src/apps/lc-compliance/tests/capture_test.cpp > @@ -18,8 +18,9 @@ namespace { > > using namespace libcamera; > > -const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; > -const std::vector<StreamRole> ROLES = { > +const int NUMREQUESTS[] = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; > + > +const StreamRole ROLES[] = { > StreamRole::Raw, > StreamRole::StillCapture, > StreamRole::VideoRecording, > -- > 2.47.1 > >
On Fri, Dec 20, 2024 at 03:08:33PM +0000, Barnabás Pőcze wrote: > There is no reason to use `std::vector` for this static > data, a simple array will do fine. > > Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> > --- > src/apps/lc-compliance/tests/capture_test.cpp | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > > diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp > index db196a949..97465a612 100644 > --- a/src/apps/lc-compliance/tests/capture_test.cpp > +++ b/src/apps/lc-compliance/tests/capture_test.cpp > @@ -18,8 +18,9 @@ namespace { > > using namespace libcamera; > > -const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; > -const std::vector<StreamRole> ROLES = { > +const int NUMREQUESTS[] = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; > + > +const StreamRole ROLES[] = { > StreamRole::Raw, > StreamRole::StillCapture, > StreamRole::VideoRecording, > -- > 2.47.1 > >
diff --git a/src/apps/lc-compliance/tests/capture_test.cpp b/src/apps/lc-compliance/tests/capture_test.cpp index db196a949..97465a612 100644 --- a/src/apps/lc-compliance/tests/capture_test.cpp +++ b/src/apps/lc-compliance/tests/capture_test.cpp @@ -18,8 +18,9 @@ namespace { using namespace libcamera; -const std::vector<int> NUMREQUESTS = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; -const std::vector<StreamRole> ROLES = { +const int NUMREQUESTS[] = { 1, 2, 3, 5, 8, 13, 21, 34, 55, 89 }; + +const StreamRole ROLES[] = { StreamRole::Raw, StreamRole::StillCapture, StreamRole::VideoRecording,
There is no reason to use `std::vector` for this static data, a simple array will do fine. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> --- src/apps/lc-compliance/tests/capture_test.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)