diff mbox series

[4/7] treewide: apply performance fixes

Message ID 20200420184649.4202-4-rosenp@gmail.com
State New
Headers show
Series None | expand

Commit Message

Rosen Penev April 20, 2020, 6:46 p.m. UTC
Found with performance*

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 utils/v4l2-compliance/v4l2-compliance.cpp | 2 +-
 utils/v4l2-compliance/v4l2-compliance.h   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
diff mbox series

Patch

diff --git a/utils/v4l2-compliance/v4l2-compliance.cpp b/utils/v4l2-compliance/v4l2-compliance.cpp
index 0c3af294..bb32bae6 100644
--- a/utils/v4l2-compliance/v4l2-compliance.cpp
+++ b/utils/v4l2-compliance/v4l2-compliance.cpp
@@ -301,7 +301,7 @@  int check_0(const void *p, int len)
 static std::map<std::string, std::string> stream_from_map;
 static std::map<std::string, bool> stream_hdr_map;
 
-std::string stream_from(std::string pixelformat, bool &use_hdr)
+std::string stream_from(const std::string& pixelformat, bool &use_hdr)
 {
 	if (stream_from_map.find(pixelformat) == stream_from_map.end()) {
 		if (pixelformat.empty())
diff --git a/utils/v4l2-compliance/v4l2-compliance.h b/utils/v4l2-compliance/v4l2-compliance.h
index 43754519..921e15be 100644
--- a/utils/v4l2-compliance/v4l2-compliance.h
+++ b/utils/v4l2-compliance/v4l2-compliance.h
@@ -263,7 +263,7 @@  int check_0(const void *p, int len);
 int restoreFormat(struct node *node);
 void testNode(struct node &node, struct node &node_m2m_cap, struct node &expbuf_node, media_type type,
 	      unsigned frame_count, unsigned all_fmt_frame_count);
-std::string stream_from(std::string pixelformat, bool &use_hdr);
+std::string stream_from(const std::string& pixelformat, bool &use_hdr);
 
 // Media Controller ioctl tests
 int testMediaDeviceInfo(struct node *node);