From b6ec0090145bbe96c8546e61ab6d44f4badb4574 Mon Sep 17 00:00:00 2001 From: wsoltys Date: Wed, 2 Oct 2013 20:39:19 +0200 Subject: [PATCH] fixed: pass string by reference --- xbmc/cores/VideoRenderers/RenderFlags.cpp | 2 +- xbmc/cores/VideoRenderers/RenderFlags.h | 2 +- xbmc/interfaces/json-rpc/PlayerOperations.cpp | 2 +- xbmc/interfaces/json-rpc/PlayerOperations.h | 2 +- xbmc/interfaces/python/PythonInvoker.cpp | 2 +- xbmc/interfaces/python/PythonInvoker.h | 2 +- xbmc/utils/XMLUtils.cpp | 2 +- xbmc/utils/XMLUtils.h | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/xbmc/cores/VideoRenderers/RenderFlags.cpp b/xbmc/cores/VideoRenderers/RenderFlags.cpp index 6c4dde0..167ae7d 100644 --- a/xbmc/cores/VideoRenderers/RenderFlags.cpp +++ b/xbmc/cores/VideoRenderers/RenderFlags.cpp @@ -83,7 +83,7 @@ namespace RenderManager { return 0; } - unsigned int GetStereoModeFlags(const std::string mode) + unsigned int GetStereoModeFlags(const std::string& mode) { static std::map convert; if(convert.empty()) diff --git a/xbmc/cores/VideoRenderers/RenderFlags.h b/xbmc/cores/VideoRenderers/RenderFlags.h index c20557c..84ee937 100644 --- a/xbmc/cores/VideoRenderers/RenderFlags.h +++ b/xbmc/cores/VideoRenderers/RenderFlags.h @@ -88,7 +88,7 @@ namespace RenderManager { unsigned int GetFlagsChromaPosition(unsigned int chroma_position); unsigned int GetFlagsColorPrimaries(unsigned int color_primaries); unsigned int GetFlagsColorTransfer(unsigned int color_transfer); - unsigned int GetStereoModeFlags(const std::string mode); + unsigned int GetStereoModeFlags(const std::string& mode); std::string GetStereoModeInvert(const std::string& mode); } diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.cpp b/xbmc/interfaces/json-rpc/PlayerOperations.cpp index 1fe759e..1a7ca3b 100644 --- a/xbmc/interfaces/json-rpc/PlayerOperations.cpp +++ b/xbmc/interfaces/json-rpc/PlayerOperations.cpp @@ -966,7 +966,7 @@ int CPlayerOperations::GetPlaylist(PlayerType player) } } -JSONRPC_STATUS CPlayerOperations::StartSlideshow(const std::string path, bool recursive, bool random) +JSONRPC_STATUS CPlayerOperations::StartSlideshow(const std::string& path, bool recursive, bool random) { int flags = 0; if (recursive) diff --git a/xbmc/interfaces/json-rpc/PlayerOperations.h b/xbmc/interfaces/json-rpc/PlayerOperations.h index 39ec077..ddecde8 100644 --- a/xbmc/interfaces/json-rpc/PlayerOperations.h +++ b/xbmc/interfaces/json-rpc/PlayerOperations.h @@ -68,7 +68,7 @@ namespace JSONRPC static int GetActivePlayers(); static PlayerType GetPlayer(const CVariant &player); static int GetPlaylist(PlayerType player); - static JSONRPC_STATUS StartSlideshow(const std::string path, bool recursive, bool random); + static JSONRPC_STATUS StartSlideshow(const std::string& path, bool recursive, bool random); static void SendSlideshowAction(int actionID); static void OnPlaylistChanged(); static JSONRPC_STATUS GetPropertyValue(PlayerType player, const CStdString &property, CVariant &result); diff --git a/xbmc/interfaces/python/PythonInvoker.cpp b/xbmc/interfaces/python/PythonInvoker.cpp index 5f83f23..dc9dae0 100644 --- a/xbmc/interfaces/python/PythonInvoker.cpp +++ b/xbmc/interfaces/python/PythonInvoker.cpp @@ -588,7 +588,7 @@ bool CPythonInvoker::initializeModule(PythonModuleInitialization module) return true; } -void CPythonInvoker::addPath(const std::string path) +void CPythonInvoker::addPath(const std::string& path) { if (path.empty()) return; diff --git a/xbmc/interfaces/python/PythonInvoker.h b/xbmc/interfaces/python/PythonInvoker.h index 71b8196..0a8a5e6 100644 --- a/xbmc/interfaces/python/PythonInvoker.h +++ b/xbmc/interfaces/python/PythonInvoker.h @@ -64,7 +64,7 @@ protected: private: void initializeModules(const std::map &modules); bool initializeModule(PythonModuleInitialization module); - void addPath(const std::string path); + void addPath(const std::string& path); std::string m_pythonPath; void *m_threadState; diff --git a/xbmc/utils/XMLUtils.cpp b/xbmc/utils/XMLUtils.cpp index a73bbaf..78ae82a 100644 --- a/xbmc/utils/XMLUtils.cpp +++ b/xbmc/utils/XMLUtils.cpp @@ -191,7 +191,7 @@ bool XMLUtils::GetAdditiveString(const TiXmlNode* pRootNode, const char* strTag, Parses the XML for multiple tags of the given name. Does not clear the array to support chaining. */ -bool XMLUtils::GetStringArray(const TiXmlNode* pRootNode, const char* strTag, std::vector& arrayValue, bool clear /* = false */, const std::string separator /* = "" */) +bool XMLUtils::GetStringArray(const TiXmlNode* pRootNode, const char* strTag, std::vector& arrayValue, bool clear /* = false */, const std::string& separator /* = "" */) { std::string strTemp; const TiXmlElement* node = pRootNode->FirstChildElement(strTag); diff --git a/xbmc/utils/XMLUtils.h b/xbmc/utils/XMLUtils.h index bb34373..5b0a4dd 100644 --- a/xbmc/utils/XMLUtils.h +++ b/xbmc/utils/XMLUtils.h @@ -55,7 +55,7 @@ public: \param clear if true, clears the string prior to adding tags, if tags are available. Defaults to false. */ static bool GetAdditiveString(const TiXmlNode* rootNode, const char* tag, const CStdString& separator, CStdString& value, bool clear = false); - static bool GetStringArray(const TiXmlNode* rootNode, const char* tag, std::vector& arrayValue, bool clear = false, const std::string separator = ""); + static bool GetStringArray(const TiXmlNode* rootNode, const char* tag, std::vector& arrayValue, bool clear = false, const std::string& separator = ""); static bool GetEncoding(const CXBMCTinyXML* pDoc, CStdString& strEncoding); static bool GetPath(const TiXmlNode* pRootNode, const char* strTag, CStdString& strStringValue); static bool GetFloat(const TiXmlNode* pRootNode, const char* strTag, float& value, const float min, const float max); -- 2.7.4