fixed: pass string by reference
authorwsoltys <wiso@no.way>
Wed, 2 Oct 2013 18:39:19 +0000 (20:39 +0200)
committerwsoltys <wiso@no.way>
Wed, 2 Oct 2013 19:47:56 +0000 (21:47 +0200)
xbmc/cores/VideoRenderers/RenderFlags.cpp
xbmc/cores/VideoRenderers/RenderFlags.h
xbmc/interfaces/json-rpc/PlayerOperations.cpp
xbmc/interfaces/json-rpc/PlayerOperations.h
xbmc/interfaces/python/PythonInvoker.cpp
xbmc/interfaces/python/PythonInvoker.h
xbmc/utils/XMLUtils.cpp
xbmc/utils/XMLUtils.h

index 6c4dde0..167ae7d 100644 (file)
@@ -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<std::string, unsigned int> convert;
     if(convert.empty())
index c20557c..84ee937 100644 (file)
@@ -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);
 
 }
index 1fe759e..1a7ca3b 100644 (file)
@@ -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)
index 39ec077..ddecde8 100644 (file)
@@ -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);
index 5f83f23..dc9dae0 100644 (file)
@@ -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;
index 71b8196..0a8a5e6 100644 (file)
@@ -64,7 +64,7 @@ protected:
 private:
   void initializeModules(const std::map<std::string, PythonModuleInitialization> &modules);
   bool initializeModule(PythonModuleInitialization module);
-  void addPath(const std::string path);
+  void addPath(const std::string& path);
 
   std::string m_pythonPath;
   void *m_threadState;
index a73bbaf..78ae82a 100644 (file)
@@ -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<std::string>& arrayValue, bool clear /* = false */, const std::string separator /* = "" */)
+bool XMLUtils::GetStringArray(const TiXmlNode* pRootNode, const char* strTag, std::vector<std::string>& arrayValue, bool clear /* = false */, const std::string& separator /* = "" */)
 {
   std::string strTemp;
   const TiXmlElement* node = pRootNode->FirstChildElement(strTag);
index bb34373..5b0a4dd 100644 (file)
@@ -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<std::string>& arrayValue, bool clear = false, const std::string separator = "");
+  static bool GetStringArray(const TiXmlNode* rootNode, const char* tag, std::vector<std::string>& 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);