commit | 60affcd5b33006db609cadfd57ca01ba58d17a36 | [log] [tgz] |
---|---|---|
author | Greg Kaiser <gkaiser@google.com> | Thu Jul 11 12:39:54 2019 -0700 |
committer | Greg Kaiser <gkaiser@google.com> | Thu Jul 11 12:39:54 2019 -0700 |
tree | ce194292bcb737f8abd09ac3523ce8c73fcfd7be | |
parent | a19c0582d697286ea5574d5841f6f7458b2b1ba5 [diff] [blame] |
IcuRegistration: Avoid string copy We pass by const reference to avoid a copy. Test: TreeHugger Change-Id: Icf3fce985f4b9ae1cccc9031f9a0ff4518b2130f
diff --git a/libandroidicuinit/IcuRegistration.cpp b/libandroidicuinit/IcuRegistration.cpp index 353ce5c..b60cdde 100644 --- a/libandroidicuinit/IcuRegistration.cpp +++ b/libandroidicuinit/IcuRegistration.cpp
@@ -211,7 +211,7 @@ // it. } -bool IcuRegistration::pathExists(const std::string path) { +bool IcuRegistration::pathExists(const std::string& path) { struct stat sb; return stat(path.c_str(), &sb) == 0; }