From c73b003c88f3222acc9519839b3879639cad2eed Mon Sep 17 00:00:00 2001 From: Moritz W Date: Wed, 23 May 2018 22:25:20 +0200 Subject: [PATCH] Pass model_id in Hue::getPictureOfModel by reference --- hueplusplus/Hue.cpp | 2 +- hueplusplus/include/Hue.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/hueplusplus/Hue.cpp b/hueplusplus/Hue.cpp index fe24b8b..853ff99 100644 --- a/hueplusplus/Hue.cpp +++ b/hueplusplus/Hue.cpp @@ -294,7 +294,7 @@ std::string Hue::getPictureOfLight(int id) const return ret; } -std::string Hue::getPictureOfModel(std::string model_id) const +std::string Hue::getPictureOfModel(const std::string& model_id) const { std::string ret = ""; if(model_id == "LCT001" || model_id == "LCT007" || model_id == "LCT010" || model_id == "LCT014" || diff --git a/hueplusplus/include/Hue.h b/hueplusplus/include/Hue.h index bb2efac..4a02c1a 100644 --- a/hueplusplus/include/Hue.h +++ b/hueplusplus/include/Hue.h @@ -176,7 +176,7 @@ public: //! Philips provides different file types. //! \param model_id Model Id of a device to get the picture of //! \return String that either contains the filename of the picture of the device or if it was not found an empty string - std::string getPictureOfModel(std::string model_id) const; + std::string getPictureOfModel(const std::string& model_id) const; //! \brief Function that sets the HttpHandler and updates the HueCommandAPI. //! -- libgit2 0.21.4