Skip to content

Commit 1ae2259

Browse files
committed
common/Formatter: use emplace_back()
This eliminates temporary `std::string` instances. Signed-off-by: Max Kellermann <[email protected]>
1 parent 673d020 commit 1ae2259

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/Formatter.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ FormatterAttrs::FormatterAttrs(const char *attr, ...)
8383
if (!val)
8484
break;
8585

86-
attrs.push_back(make_pair(std::string(s), std::string(val)));
86+
attrs.emplace_back(s, val);
8787
s = va_arg(ap, char *);
8888
} while (s);
8989
va_end(ap);

0 commit comments

Comments
 (0)