pipeline: raspberrypi: Make RPi::Stream::name() return const std::string &
Return a const std::string reference from RPi::Stream::name() to avoid copying a string when not needed. Signed-off-by: Naushir Patuck <naush@raspberrypi.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
This commit is contained in:
parent
503bebd0ed
commit
fd29edccae
2 changed files with 2 additions and 2 deletions
|
@ -19,7 +19,7 @@ V4L2VideoDevice *Stream::dev() const
|
|||
return dev_.get();
|
||||
}
|
||||
|
||||
std::string Stream::name() const
|
||||
const std::string &Stream::name() const
|
||||
{
|
||||
return name_;
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
}
|
||||
|
||||
V4L2VideoDevice *dev() const;
|
||||
std::string name() const;
|
||||
const std::string &name() const;
|
||||
bool isImporter() const;
|
||||
void resetBuffers();
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue