From a018d5951409fc3c4253cade2632bdbab7351d98 Mon Sep 17 00:00:00 2001 From: "jhawkins@chromium.org" Date: Wed, 21 Oct 2009 21:40:59 +0000 Subject: Coverity: Pass strings by reference. CID=2635 BUG=none TEST=none Review URL: http://codereview.chromium.org/293058 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@29716 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/app/client_util.cc | 4 ++-- chrome/app/client_util.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome') diff --git a/chrome/app/client_util.cc b/chrome/app/client_util.cc index 0285c56..93cbdcd 100644 --- a/chrome/app/client_util.cc +++ b/chrome/app/client_util.cc @@ -63,8 +63,8 @@ bool GetChromiumVersion(const wchar_t* const exe_path, return ret; } -std::wstring GetDLLPath(const std::wstring dll_name, - const std::wstring dll_path) { +std::wstring GetDLLPath(const std::wstring& dll_name, + const std::wstring& dll_path) { if (!dll_path.empty() && FileExists(dll_path.c_str())) return dll_path + L"\\" + dll_name; diff --git a/chrome/app/client_util.h b/chrome/app/client_util.h index 0603f08..2821c1d 100644 --- a/chrome/app/client_util.h +++ b/chrome/app/client_util.h @@ -33,8 +33,8 @@ bool GetChromiumVersion(const wchar_t* const exe_path, // Get path to DLL specified by dll_name. If dll_path is specified and it // exists we assume DLL is in that directory and return that. Else we search // for that DLL by calling Windows API. -std::wstring GetDLLPath(const std::wstring dll_name, - const std::wstring dll_path); +std::wstring GetDLLPath(const std::wstring& dll_name, + const std::wstring& dll_path); // Returns the path to the exe (without the file name) that called this // function. The buffer should already be allocated (ideally of MAX_PATH size). -- cgit v1.1