Commit c73b003c88f3222acc9519839b3879639cad2eed
Committed by
Moritz Wirger
1 parent
27f68c38
Pass model_id in Hue::getPictureOfModel by reference
Showing
2 changed files
with
2 additions
and
2 deletions
hueplusplus/Hue.cpp
| @@ -294,7 +294,7 @@ std::string Hue::getPictureOfLight(int id) const | @@ -294,7 +294,7 @@ std::string Hue::getPictureOfLight(int id) const | ||
| 294 | return ret; | 294 | return ret; |
| 295 | } | 295 | } |
| 296 | 296 | ||
| 297 | -std::string Hue::getPictureOfModel(std::string model_id) const | 297 | +std::string Hue::getPictureOfModel(const std::string& model_id) const |
| 298 | { | 298 | { |
| 299 | std::string ret = ""; | 299 | std::string ret = ""; |
| 300 | if(model_id == "LCT001" || model_id == "LCT007" || model_id == "LCT010" || model_id == "LCT014" || | 300 | if(model_id == "LCT001" || model_id == "LCT007" || model_id == "LCT010" || model_id == "LCT014" || |
hueplusplus/include/Hue.h
| @@ -176,7 +176,7 @@ public: | @@ -176,7 +176,7 @@ public: | ||
| 176 | //! Philips provides different file types. | 176 | //! Philips provides different file types. |
| 177 | //! \param model_id Model Id of a device to get the picture of | 177 | //! \param model_id Model Id of a device to get the picture of |
| 178 | //! \return String that either contains the filename of the picture of the device or if it was not found an empty string | 178 | //! \return String that either contains the filename of the picture of the device or if it was not found an empty string |
| 179 | - std::string getPictureOfModel(std::string model_id) const; | 179 | + std::string getPictureOfModel(const std::string& model_id) const; |
| 180 | 180 | ||
| 181 | //! \brief Function that sets the HttpHandler and updates the HueCommandAPI. | 181 | //! \brief Function that sets the HttpHandler and updates the HueCommandAPI. |
| 182 | //! | 182 | //! |