@@ -3058,7 +3058,7 @@ static void streamFmt(struct node *node, __u32 pixelformat, __u32 w, __u32 h,
selTest test = createSelTest(node);
if (!haveSelTest(test))
- selTests.push_back(createSelTest(node));
+ selTests.push_back(test);
for (unsigned i = 0; i < 8; i++) {
v4l2_selection *sel1 = selections[node->can_output][i & 1];
@@ -996,8 +996,8 @@ void common_cmd(const std::string &media_bus_info, int ch, char *optarg)
std::exit(EXIT_FAILURE);
}
if (const char *equal = std::strchr(value, '=')) {
- set_ctrls.push_back(std::make_pair(std::string(value, (equal - value)),
- std::string(equal + 1)));
+ set_ctrls.emplace_back(std::string(value, (equal - value)),
+ std::string(equal + 1));
}
else {
fprintf(stderr, "control '%s' without '='\n", value);
Avoids having to call the constructor as it forwards the arguments directly. Signed-off-by: Rosen Penev <rosenp@gmail.com> --- utils/v4l2-compliance/v4l2-test-buffers.cpp | 2 +- utils/v4l2-ctl/v4l2-ctl-common.cpp | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-)