libcamera: ipa_module: Avoid unnecessary copy when getting signature
The `signature()` getter can just return a reference to the private vector member variable, and let the caller make a copy if needed. Since the return type is const qualified, this was likely the original intention. Signed-off-by: Barnabás Pőcze <barnabas.pocze@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Paul Elder <paul.elder@ideasonboard.com>
This commit is contained in:
parent
86c45c8fdf
commit
f31da7272e
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ public:
|
||||||
bool isValid() const;
|
bool isValid() const;
|
||||||
|
|
||||||
const struct IPAModuleInfo &info() const;
|
const struct IPAModuleInfo &info() const;
|
||||||
const std::vector<uint8_t> signature() const;
|
const std::vector<uint8_t> &signature() const;
|
||||||
const std::string &path() const;
|
const std::string &path() const;
|
||||||
|
|
||||||
bool load();
|
bool load();
|
||||||
|
|
|
@ -373,7 +373,7 @@ const struct IPAModuleInfo &IPAModule::info() const
|
||||||
*
|
*
|
||||||
* \return The IPA module signature
|
* \return The IPA module signature
|
||||||
*/
|
*/
|
||||||
const std::vector<uint8_t> IPAModule::signature() const
|
const std::vector<uint8_t> &IPAModule::signature() const
|
||||||
{
|
{
|
||||||
return signature_;
|
return signature_;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue