libcamera: ipa_data_serializer: Remove some vector reserve()
calls
`appendPOD()` does a single insertion, so if only a single `appendPOD()` will be called on a vector before returning, then calling `reserve()` is not that useful, so remove it. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com>
This commit is contained in:
parent
e633d85be9
commit
4709f8442b
2 changed files with 0 additions and 2 deletions
|
@ -309,7 +309,6 @@ public:
|
|||
serialize(const Flags<E> &data, [[maybe_unused]] ControlSerializer *cs = nullptr)
|
||||
{
|
||||
std::vector<uint8_t> dataVec;
|
||||
dataVec.reserve(sizeof(Flags<E>));
|
||||
appendPOD<uint32_t>(dataVec, static_cast<typename Flags<E>::Type>(data));
|
||||
|
||||
return { dataVec, {} };
|
||||
|
|
|
@ -196,7 +196,6 @@ IPADataSerializer<type>::serialize(const type &data, \
|
|||
[[maybe_unused]] ControlSerializer *cs) \
|
||||
{ \
|
||||
std::vector<uint8_t> dataVec; \
|
||||
dataVec.reserve(sizeof(type)); \
|
||||
appendPOD<type>(dataVec, data); \
|
||||
\
|
||||
return { dataVec, {} }; \
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue