summaryrefslogtreecommitdiff
path: root/test/camera/configuration_default.cpp
diff options
context:
space:
mode:
authorBarnabás Pőcze <pobrn@protonmail.com>2023-04-18 16:26:04 +0000
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2023-04-19 11:04:31 +0300
commit46852241a34066026e480d928d57da9cdb02b1bf (patch)
tree85b78cd41369c32723120cf2c8e5e5df566de3a9 /test/camera/configuration_default.cpp
parente0a51061bc69568f6b6b8f956b327f850f094430 (diff)
libcamera: device_enumerator_udev: Use std::string_view
In `udevNotify()`, constructing an std::string from the device's associated action is unnecessary as it is only compared against static strings, and for that purpose an std::string_view works just as well, while being cheaper to construct. In the same vein, an std::string_view can be used to store the device's devnode initially, and the string construction can be deferred until it is needed. Furthermore, previously `udev_device_get_devnode()` was called twice. The extra call is now removed. Signed-off-by: Barnabás Pőcze <pobrn@protonmail.com> Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Reviewed-by: Jacopo Mondi <jacopo.mondi@ideasonboard.com> Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'test/camera/configuration_default.cpp')
0 files changed, 0 insertions, 0 deletions