Skip to content

Commit b105a27

Browse files
committedAug 12, 2024·
Drop memset of atomic write sessions
1 parent 1ea2a9a commit b105a27

File tree

2 files changed

+3
-8
lines changed

2 files changed

+3
-8
lines changed
 

‎examples/thermostat/thermostat-common/include/atomic-write-manager.h

+3-3
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class ThermostatAtomicWriteManager : public AtomicWriteManager
6666
private:
6767
static ThermostatAtomicWriteManager sInstance;
6868

69-
ThermostatAtomicWriteManager();
69+
ThermostatAtomicWriteManager() = default;
7070
~ThermostatAtomicWriteManager() = default;
7171

7272
ThermostatAtomicWriteManager(const ThermostatAtomicWriteManager &) = delete;
@@ -86,8 +86,8 @@ class ThermostatAtomicWriteManager : public AtomicWriteManager
8686
struct AtomicWriteSession
8787
{
8888
AtomicWriteState state = kAtomicWriteState_Closed;
89-
ScopedNodeId nodeId;
90-
EndpointId endpointId = kInvalidEndpointId;
89+
ScopedNodeId nodeId = ScopedNodeId();
90+
EndpointId endpointId = kInvalidEndpointId;
9191
};
9292

9393
AtomicWriteDelegate * mDelegate;

‎examples/thermostat/thermostat-common/src/atomic-write-manager.cpp

-5
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,6 @@ namespace Thermostat {
3535

3636
ThermostatAtomicWriteManager ThermostatAtomicWriteManager::sInstance;
3737

38-
ThermostatAtomicWriteManager::ThermostatAtomicWriteManager()
39-
{
40-
memset(mAtomicWriteSessions, 0, sizeof(mAtomicWriteSessions));
41-
}
42-
4338
/**
4439
* @brief Callback that is called when the timeout for editing the presets expires.
4540
*

0 commit comments

Comments
 (0)