From 210bb7ea89562242ee6b0e0b5a0258d26d3264c0 Mon Sep 17 00:00:00 2001 From: Greg Kaiser Date: Tue, 12 Feb 2019 12:40:05 -0800 Subject: 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 --- libs/graphicsenv/GraphicsEnv.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'libs/graphicsenv/GraphicsEnv.cpp') 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" -- cgit v1.2.3-59-g8ed1b