summaryrefslogtreecommitdiff
path: root/odrefresh/odr_common.cc
diff options
context:
space:
mode:
Diffstat (limited to 'odrefresh/odr_common.cc')
-rw-r--r--odrefresh/odr_common.cc14
1 files changed, 3 insertions, 11 deletions
diff --git a/odrefresh/odr_common.cc b/odrefresh/odr_common.cc
index 94674bc1d0..ec18884a05 100644
--- a/odrefresh/odr_common.cc
+++ b/odrefresh/odr_common.cc
@@ -28,6 +28,7 @@
#include "android-base/logging.h"
#include "android-base/parseint.h"
#include "android-base/result.h"
+#include "fmt/format.h"
namespace art {
namespace odrefresh {
@@ -36,19 +37,10 @@ namespace {
using ::android::base::Result;
+using ::fmt::literals::operator""_format; // NOLINT
}
-std::string Concatenate(std::initializer_list<std::string_view> args) {
- std::stringstream ss;
- for (auto arg : args) {
- ss << arg;
- }
- return ss.str();
-}
-
-std::string QuotePath(std::string_view path) {
- return Concatenate({"'", path, "'"});
-}
+std::string QuotePath(std::string_view path) { return "'{}'"_format(path); }
Result<int> ParseSecurityPatchStr(const std::string& security_patch_str) {
std::regex security_patch_regex(R"re((\d{4})-(\d{2})-(\d{2}))re");