Commit 2578f2b77d823020e93e8fb3c346df362a3a16ca

Authored by Jojo-1000
Committed by Moritz Wirger
1 parent 4ae8d997

Fix non-windows template compile errors.

include/hueplusplus/ResourceList.h
@@ -73,7 +73,7 @@ public: @@ -73,7 +73,7 @@ public:
73 //! \brief Deleted copy constructor 73 //! \brief Deleted copy constructor
74 ResourceList(const ResourceList&) = delete; 74 ResourceList(const ResourceList&) = delete;
75 //! \brief Defaulted move constructor 75 //! \brief Defaulted move constructor
76 - ResourceList(ResourceList&&) = default; 76 + ResourceList(ResourceList&&) noexcept = default;
77 //! \brief Deleted copy assignment 77 //! \brief Deleted copy assignment
78 ResourceList& operator=(const ResourceList&) = delete; 78 ResourceList& operator=(const ResourceList&) = delete;
79 //! \brief Defaulted move assignment 79 //! \brief Defaulted move assignment
@@ -285,19 +285,19 @@ public: @@ -285,19 +285,19 @@ public:
285 //! \see ResourceList::get 285 //! \see ResourceList::get
286 Resource& get(const int& id) 286 Resource& get(const int& id)
287 { 287 {
288 - auto pos = resources.find(id);  
289 - if (pos != resources.end()) 288 + auto pos = this->resources.find(id);
  289 + if (pos != this->resources.end())
290 { 290 {
291 pos->second.refresh(); 291 pos->second.refresh();
292 return pos->second; 292 return pos->second;
293 } 293 }
294 - const nlohmann::json& state = stateCache.getValue();  
295 - std::string key = maybeToString(id); 294 + const nlohmann::json& state = this->stateCache.getValue();
  295 + std::string key = this->maybeToString(id);
296 if (!state.count(key) && id != 0) 296 if (!state.count(key) && id != 0)
297 { 297 {
298 throw HueException(FileInfo {__FILE__, __LINE__, __func__}, "Resource id is not valid"); 298 throw HueException(FileInfo {__FILE__, __LINE__, __func__}, "Resource id is not valid");
299 } 299 }
300 - return resources.emplace(id, construct(id, state[key])).first->second; 300 + return this->resources.emplace(id, this->construct(id, state[key])).first->second;
301 } 301 }
302 //! \brief Get group, specially handles group 0 302 //! \brief Get group, specially handles group 0
303 //! \see ResourceList::exists 303 //! \see ResourceList::exists
src/ExtendedColorHueStrategy.cpp
@@ -36,7 +36,6 @@ bool ExtendedColorHueStrategy::alertHueSaturation(const HueSaturation& hueSat, H @@ -36,7 +36,6 @@ bool ExtendedColorHueStrategy::alertHueSaturation(const HueSaturation& hueSat, H
36 const nlohmann::json& state = light.state.getValue()["state"]; 36 const nlohmann::json& state = light.state.getValue()["state"];
37 std::string cType = state["colormode"].get<std::string>(); 37 std::string cType = state["colormode"].get<std::string>();
38 bool on = state["on"].get<bool>(); 38 bool on = state["on"].get<bool>();
39 - const HueLight& cLight = light;  
40 if (cType != "ct") 39 if (cType != "ct")
41 { 40 {
42 return SimpleColorHueStrategy::alertHueSaturation(hueSat, light); 41 return SimpleColorHueStrategy::alertHueSaturation(hueSat, light);