diff options
author | 2023-07-06 14:06:20 +0000 | |
---|---|---|
committer | 2023-07-11 10:05:16 +0000 | |
commit | db9deaf6695ec111eb154f3dcf2a043d63043a70 (patch) | |
tree | 0988bf38eb7bc0607318222be80cd39206930a2a /runtime/class_loader_context.cc | |
parent | a23be81ffa13177d4fffe5e515486349e2903011 (diff) |
Fix performance-inefficient-string-concatenation clang-tidy issues
Bug: 264654008
Test: m tidy-art
Change-Id: I10c4192331a7a0608f4252b6da5d7579ce4af9d0
Diffstat (limited to 'runtime/class_loader_context.cc')
-rw-r--r-- | runtime/class_loader_context.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/runtime/class_loader_context.cc b/runtime/class_loader_context.cc index 178c54fb6b..73546ed0a9 100644 --- a/runtime/class_loader_context.cc +++ b/runtime/class_loader_context.cc @@ -455,7 +455,8 @@ bool ClassLoaderContext::OpenDexFiles(const std::string& classpath_dir, // If path is relative, append it to the provided base directory. std::string location = cp_elem; if (location[0] != '/' && !classpath_dir.empty()) { - location = classpath_dir + (classpath_dir.back() == '/' ? "" : "/") + location; + location = + ART_FORMAT("{}{}{}", classpath_dir, classpath_dir.back() == '/' ? "" : "/", location); } // If file descriptors were provided for the class loader context dex paths, |