diff options
author | ki.stfu <ki.stfu@gmail.com> | 2015-09-20 16:20:02 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-09-20 23:20:29 +0000 |
commit | b3289e3585348883a3cac9a5cafc986d521bbb39 (patch) | |
tree | ac0cf27d11a82c56f87d9eda7888f6fa4d605a80 /chrome_elf | |
parent | 912469298b1b5af90ca384ecea84e98f83724181 (diff) | |
download | chromium_src-b3289e3585348883a3cac9a5cafc986d521bbb39.zip chromium_src-b3289e3585348883a3cac9a5cafc986d521bbb39.tar.gz chromium_src-b3289e3585348883a3cac9a5cafc986d521bbb39.tar.bz2 |
Cleanup: Pass std::string as const reference from chrome_elf/
Passing std::string by reference can prevent extra copying of object.
BUG=367418
TEST=
R=caitkp@chromium.org,robertshield@chromium.org
Review URL: https://codereview.chromium.org/1352793003
Cr-Commit-Position: refs/heads/master@{#349887}
Diffstat (limited to 'chrome_elf')
-rw-r--r-- | chrome_elf/dll_hash/dll_hash.cc | 2 | ||||
-rw-r--r-- | chrome_elf/dll_hash/dll_hash.h | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/chrome_elf/dll_hash/dll_hash.cc b/chrome_elf/dll_hash/dll_hash.cc index ecd1491..d98c49d 100644 --- a/chrome_elf/dll_hash/dll_hash.cc +++ b/chrome_elf/dll_hash/dll_hash.cc @@ -5,7 +5,7 @@ #include "base/hash.h" #include "chrome_elf/dll_hash/dll_hash.h" -int DllNameToHash(std::string dll_name) { +int DllNameToHash(const std::string& dll_name) { uint32 data = base::Hash(dll_name); // Strip off the signed bit because UMA doesn't support negative values, diff --git a/chrome_elf/dll_hash/dll_hash.h b/chrome_elf/dll_hash/dll_hash.h index 82bec8a..2cfca81 100644 --- a/chrome_elf/dll_hash/dll_hash.h +++ b/chrome_elf/dll_hash/dll_hash.h @@ -8,6 +8,6 @@ #include <string> // Convert a dll name to a hash that can be sent via UMA. -int DllNameToHash(std::string dll_name); +int DllNameToHash(const std::string& dll_name); #endif // CHROME_ELF_DLL_HASH_DLL_HASH_H_ |