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
diff --git a/libs/graphicsenv/GraphicsEnv.cpp b/libs/graphicsenv/GraphicsEnv.cpp
index c20d54b..9a28ec7 100644
--- a/libs/graphicsenv/GraphicsEnv.cpp
+++ b/libs/graphicsenv/GraphicsEnv.cpp
@@ -156,9 +156,9 @@
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"