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:
Naushir Patuck 2023-05-03 13:20:33 +01:00 committed by Laurent Pinchart
parent 503bebd0ed
commit fd29edccae
2 changed files with 2 additions and 2 deletions

View file

@ -19,7 +19,7 @@ V4L2VideoDevice *Stream::dev() const
return dev_.get();
}
std::string Stream::name() const
const std::string &Stream::name() const
{
return name_;
}

View file

@ -49,7 +49,7 @@ public:
}
V4L2VideoDevice *dev() const;
std::string name() const;
const std::string &name() const;
bool isImporter() const;
void resetBuffers();