diff options
| author | 2019-02-12 12:40:05 -0800 | |
|---|---|---|
| committer | 2019-02-12 12:41:55 -0800 | |
| commit | 210bb7ea89562242ee6b0e0b5a0258d26d3264c0 (patch) | |
| tree | 892f442b657de86d9c96f9c77c3ecd12dfb12b21 /libs/graphicsenv/GraphicsEnv.cpp | |
| parent | 07698602b742e067e05777ac1216359788d05834 (diff) | |
Use const reference in setGpuStats() API
Rather than make a copy of these strings when the function is
called, we pass them by const reference.
Test: TreeHugger
Change-Id: Ief53fea1f6df191181e00eab978cf53b5a2ab91d
Diffstat (limited to 'libs/graphicsenv/GraphicsEnv.cpp')
| -rw-r--r-- | libs/graphicsenv/GraphicsEnv.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp index c20d54b7f2..9a28ec7a7e 100644 --- a/libs/graphicsenv/GraphicsEnv.cpp +++ b/libs/graphicsenv/GraphicsEnv.cpp @@ -156,9 +156,9 @@ void GraphicsEnv::setDriverPath(const std::string path) { mDriverPath = path; } -void GraphicsEnv::setGpuStats(const std::string driverPackageName, - const std::string driverVersionName, const uint64_t driverVersionCode, - const std::string appPackageName) { +void GraphicsEnv::setGpuStats(const std::string& driverPackageName, + const std::string& driverVersionName, + const uint64_t driverVersionCode, const std::string& appPackageName) { ATRACE_CALL(); ALOGV("setGpuStats:\n" |