diff --git a/include/hueplusplus/Schedule.h b/include/hueplusplus/Schedule.h index f39b7d1..80c861e 100644 --- a/include/hueplusplus/Schedule.h +++ b/include/hueplusplus/Schedule.h @@ -61,7 +61,7 @@ public: //! \brief Get time when the event(s) will occur //! \returns TimePattern in local timezone time::TimePattern getTime() const; - //! \brief Get whether schedule is enabled or disabled + //! \brief Check whether schedule is enabled or disabled bool isEnabled() const; //! \brief Get autodelete //! diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 6a7bca2..b90d1a2 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -1,6 +1,6 @@ set(hueplusplus_SOURCES Action.cpp - APICache.cpp + APICache.cpp BaseDevice.cpp BaseHttpHandler.cpp Bridge.cpp @@ -9,9 +9,9 @@ set(hueplusplus_SOURCES ColorUnits.cpp ExtendedColorHueStrategy.cpp ExtendedColorTemperatureStrategy.cpp - Group.cpp + Group.cpp HueCommandAPI.cpp - HueDeviceTypes.cpp + HueDeviceTypes.cpp HueException.cpp Light.cpp ModelPictures.cpp diff --git a/src/Rule.cpp b/src/Rule.cpp index de328d1..5a50489 100644 --- a/src/Rule.cpp +++ b/src/Rule.cpp @@ -72,6 +72,8 @@ nlohmann::json Condition::toJson() const case Operator::notIn: opStr = "not in"; break; + default: + throw HueException(CURRENT_FILE_INFO, "Invalid operator enum value: " + std::to_string(static_cast(op))); } nlohmann::json result = {{"address", address}, {"operator", opStr}}; diff --git a/test/mocks/mock_Light.h b/test/mocks/mock_Light.h index 84c5861..b532510 100644 --- a/test/mocks/mock_Light.h +++ b/test/mocks/mock_Light.h @@ -73,7 +73,7 @@ public: MOCK_CONST_METHOD0(getSwVersion, std::string()); - MOCK_METHOD1(setName, bool(std::string& name)); + MOCK_METHOD1(setName, bool(const std::string& name)); MOCK_CONST_METHOD0(getColorType, hueplusplus::ColorType());