diff --git a/de_web_plugin.cpp b/de_web_plugin.cpp index 365c4e3d20..df264bd705 100644 --- a/de_web_plugin.cpp +++ b/de_web_plugin.cpp @@ -34,6 +34,7 @@ #include #include "alarm_system_device_table.h" #include "database.h" +#include "deconz/u_assert.h" #include "device_ddf_init.h" #include "device_descriptions.h" #include "device_tick.h" @@ -16547,11 +16548,11 @@ Resource *DEV_AddResource(const LightNode &lightNode) */ void DEV_AllocateGroup(const Device *device, Resource *rsub, ResourceItem *item) { - assert(device); - assert(rsub); - assert(rsub->item(RAttrId)); - assert(item); - assert(item->descriptor().suffix == RConfigGroup); + U_ASSERT(device); + U_ASSERT(rsub); + U_ASSERT(rsub->item(RAttrId)); + U_ASSERT(item); + U_ASSERT(item->descriptor().suffix == RConfigGroup); if (!device || !rsub || !rsub->item(RAttrId) || !item || item->descriptor().suffix != RConfigGroup) { diff --git a/device_ddf_init.cpp b/device_ddf_init.cpp index 2346f04450..0c6e0d7cc7 100644 --- a/device_ddf_init.cpp +++ b/device_ddf_init.cpp @@ -152,7 +152,7 @@ static ResourceItem *DEV_InitDeviceDescriptionItem(const DeviceDescription::Item } } - assert(ddfItem.handle != DeviceDescription::Item::InvalidItemHandle); + U_ASSERT(ddfItem.handle != DeviceDescription::Item::InvalidItemHandle); item->setDdfItemHandle(ddfItem.handle); // check updates diff --git a/device_descriptions.cpp b/device_descriptions.cpp index 47a5a2415a..755eefd51b 100644 --- a/device_descriptions.cpp +++ b/device_descriptions.cpp @@ -1502,7 +1502,7 @@ const DeviceDescription::SubDevice &DeviceDescriptions::getSubDevice(const Resou for (int i = 0; i < resource->itemCount(); i++) { const ResourceItem *item = resource->itemForIndex(size_t(i)); - assert(item); + U_ASSERT(item); h.handle = item->ddfItemHandle(); if (h.handle == DeviceDescription::Item::InvalidItemHandle) diff --git a/rest_devices.cpp b/rest_devices.cpp index abea6e4739..682b81eedb 100644 --- a/rest_devices.cpp +++ b/rest_devices.cpp @@ -762,7 +762,7 @@ bool ddfSerializeV1(JsonDoc &doc, const DeviceDescription &ddf, char *buf, size_ { sz = serializeJson(doc, buf, bufsize); } - assert(sz < bufsize); + U_ASSERT(sz < bufsize); DBG_Printf(DBG_INFO, "JSON serialized size %d\n", int(sz));