From 044a7498f7ac5a876a5f372e594ef213d3abf95f Mon Sep 17 00:00:00 2001 From: Jason Watkins Date: Mon, 11 May 2015 12:29:40 -0700 Subject: [PATCH] Converted value type string args to const references. --- xpcPlugin/DataManager.cpp | 4 ++-- xpcPlugin/DataManager.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/xpcPlugin/DataManager.cpp b/xpcPlugin/DataManager.cpp index 4a2bd97..435096f 100644 --- a/xpcPlugin/DataManager.cpp +++ b/xpcPlugin/DataManager.cpp @@ -300,7 +300,7 @@ namespace XPC XPData[26][0] = DREF_ThrottleActual; } - int DataManager::Get(string dref, float values[], int size) + int DataManager::Get(const string& dref, float values[], int size) { XPLMDataRef& xdref = sdrefs[dref]; if (xdref == NULL) @@ -529,7 +529,7 @@ namespace XPC XPLMSetDatavi(xdref, values, 0, drefSize); } - void DataManager::Set(string dref, float values[], int size) + void DataManager::Set(const string& dref, float values[], int size) { XPLMDataRef& xdref = sdrefs[dref]; if (xdref == NULL) diff --git a/xpcPlugin/DataManager.h b/xpcPlugin/DataManager.h index 1bb7ffb..4e94832 100644 --- a/xpcPlugin/DataManager.h +++ b/xpcPlugin/DataManager.h @@ -174,7 +174,7 @@ namespace XPC /// doubles where high precision is required, using this method may result /// in a loss of precision. In that case, consider using one of the /// strongly typed methods instead. - static int Get(std::string dref, float values[], int size); + static int Get(const std::string& dref, float values[], int size); /// Gets the value of a double dataref. /// @@ -294,7 +294,7 @@ namespace XPC /// doubles where high precision is required, using this method may result /// in a loss of precision. In that case, consider using one of the /// strongly typed methods instead. - static void Set(std::string dref, float values[], int size); + static void Set(const std::string& dref, float values[], int size); /// Sets the value of a double dataref. ///