Skip to content

Commit f356be8

Browse files
server/Server.cpp Initialize ChipDeviceEvent on instantiation (project-chip#38047)
This fixes an error: src/app/server/Server.cpp:621:34: error: call to implicitly-deleted default constructor of 'DeviceLayer::ChipDeviceEvent' 621 | DeviceLayer::ChipDeviceEvent event; | ^ src/include/platform/CHIPDeviceEvent.h:508:11: note: default constructor of 'ChipDeviceEvent' is implicitly deleted because variant field 'CHIPoBLEConnectionError' has a non-trivial default constructor 508 | } CHIPoBLEConnectionError; | ^ 1 error generated.
1 parent 52d8e11 commit f356be8

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/app/server/Server.cpp

+1-2
Original file line numberDiff line numberDiff line change
@@ -618,8 +618,7 @@ void Server::GenerateShutDownEvent()
618618

619619
void Server::PostFactoryResetEvent()
620620
{
621-
DeviceLayer::ChipDeviceEvent event;
622-
event.Type = DeviceLayer::DeviceEventType::kFactoryReset;
621+
DeviceLayer::ChipDeviceEvent event{ .Type = DeviceLayer::DeviceEventType::kFactoryReset };
623622

624623
CHIP_ERROR error = DeviceLayer::PlatformMgr().PostEvent(&event);
625624
if (error != CHIP_NO_ERROR)

0 commit comments

Comments
 (0)