Commit 710ee59b143cac5e6b0cfe04be1473aa8a8254c2
Committed by
Moritz Wirger
1 parent
0b28967a
Apply code review changes.
Showing
4 changed files
with
7 additions
and
5 deletions
include/hueplusplus/Schedule.h
| @@ -61,7 +61,7 @@ public: | @@ -61,7 +61,7 @@ public: | ||
| 61 | //! \brief Get time when the event(s) will occur | 61 | //! \brief Get time when the event(s) will occur |
| 62 | //! \returns TimePattern in local timezone | 62 | //! \returns TimePattern in local timezone |
| 63 | time::TimePattern getTime() const; | 63 | time::TimePattern getTime() const; |
| 64 | - //! \brief Get whether schedule is enabled or disabled | 64 | + //! \brief Check whether schedule is enabled or disabled |
| 65 | bool isEnabled() const; | 65 | bool isEnabled() const; |
| 66 | //! \brief Get autodelete | 66 | //! \brief Get autodelete |
| 67 | //! | 67 | //! |
src/CMakeLists.txt
| 1 | set(hueplusplus_SOURCES | 1 | set(hueplusplus_SOURCES |
| 2 | Action.cpp | 2 | Action.cpp |
| 3 | - APICache.cpp | 3 | + APICache.cpp |
| 4 | BaseDevice.cpp | 4 | BaseDevice.cpp |
| 5 | BaseHttpHandler.cpp | 5 | BaseHttpHandler.cpp |
| 6 | Bridge.cpp | 6 | Bridge.cpp |
| @@ -9,9 +9,9 @@ set(hueplusplus_SOURCES | @@ -9,9 +9,9 @@ set(hueplusplus_SOURCES | ||
| 9 | ColorUnits.cpp | 9 | ColorUnits.cpp |
| 10 | ExtendedColorHueStrategy.cpp | 10 | ExtendedColorHueStrategy.cpp |
| 11 | ExtendedColorTemperatureStrategy.cpp | 11 | ExtendedColorTemperatureStrategy.cpp |
| 12 | - Group.cpp | 12 | + Group.cpp |
| 13 | HueCommandAPI.cpp | 13 | HueCommandAPI.cpp |
| 14 | - HueDeviceTypes.cpp | 14 | + HueDeviceTypes.cpp |
| 15 | HueException.cpp | 15 | HueException.cpp |
| 16 | Light.cpp | 16 | Light.cpp |
| 17 | ModelPictures.cpp | 17 | ModelPictures.cpp |
src/Rule.cpp
| @@ -72,6 +72,8 @@ nlohmann::json Condition::toJson() const | @@ -72,6 +72,8 @@ nlohmann::json Condition::toJson() const | ||
| 72 | case Operator::notIn: | 72 | case Operator::notIn: |
| 73 | opStr = "not in"; | 73 | opStr = "not in"; |
| 74 | break; | 74 | break; |
| 75 | + default: | ||
| 76 | + throw HueException(CURRENT_FILE_INFO, "Invalid operator enum value: " + std::to_string(static_cast<int>(op))); | ||
| 75 | } | 77 | } |
| 76 | 78 | ||
| 77 | nlohmann::json result = {{"address", address}, {"operator", opStr}}; | 79 | nlohmann::json result = {{"address", address}, {"operator", opStr}}; |
test/mocks/mock_Light.h
| @@ -73,7 +73,7 @@ public: | @@ -73,7 +73,7 @@ public: | ||
| 73 | 73 | ||
| 74 | MOCK_CONST_METHOD0(getSwVersion, std::string()); | 74 | MOCK_CONST_METHOD0(getSwVersion, std::string()); |
| 75 | 75 | ||
| 76 | - MOCK_METHOD1(setName, bool(std::string& name)); | 76 | + MOCK_METHOD1(setName, bool(const std::string& name)); |
| 77 | 77 | ||
| 78 | MOCK_CONST_METHOD0(getColorType, hueplusplus::ColorType()); | 78 | MOCK_CONST_METHOD0(getColorType, hueplusplus::ColorType()); |
| 79 | 79 |