Skip to content

Commit

Permalink
clang-tidy fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
hasty committed Aug 5, 2024
1 parent 18325f4 commit 11eda5a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ PresetStructWithOwnedMembers::PresetStructWithOwnedMembers(const PresetStruct::T
*this = other;
}

void PresetStructWithOwnedMembers::operator=(const PresetStruct::Type & other)
PresetStructWithOwnedMembers & PresetStructWithOwnedMembers::operator=(const PresetStruct::Type & other)
{
SetPresetScenario(other.presetScenario);
CHIP_ERROR err = SetPresetHandle(other.presetHandle);
Expand All @@ -48,11 +48,17 @@ void PresetStructWithOwnedMembers::operator=(const PresetStruct::Type & other)
SetCoolingSetpoint(other.coolingSetpoint);
SetHeatingSetpoint(other.heatingSetpoint);
SetBuiltIn(other.builtIn);
return *this;
}

void PresetStructWithOwnedMembers::operator=(const PresetStructWithOwnedMembers & other)
PresetStructWithOwnedMembers & PresetStructWithOwnedMembers::operator=(const PresetStructWithOwnedMembers & other)
{
if (this == &other)
{
return *this;
}
*this = static_cast<const PresetStruct::Type &>(other);
return *this;
}

void PresetStructWithOwnedMembers::SetPresetScenario(PresetScenarioEnum enumValue)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,8 @@ struct PresetStructWithOwnedMembers : protected Structs::PresetStruct::Type
public:
PresetStructWithOwnedMembers() = default;
PresetStructWithOwnedMembers(const Structs::PresetStruct::Type & other);
void operator=(const Structs::PresetStruct::Type & other);
void operator=(const PresetStructWithOwnedMembers & other);
PresetStructWithOwnedMembers & operator=(const Structs::PresetStruct::Type & other);
PresetStructWithOwnedMembers & operator=(const PresetStructWithOwnedMembers & other);

void SetPresetScenario(PresetScenarioEnum enumValue);
CHIP_ERROR SetPresetHandle(const DataModel::Nullable<ByteSpan> & newPresetHandle);
Expand Down
1 change: 0 additions & 1 deletion src/app/clusters/thermostat-server/thermostat-server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1446,7 +1446,6 @@ void handleAtomicBegin(CommandHandler * commandObj, const ConcreteCommandPath &
gThermostatAttrAccess.SetAtomicWrite(endpoint, true);
gThermostatAttrAccess.SetAtomicWriteScopedNodeId(endpoint, GetSourceScopedNodeId(commandObj));
sendAtomicResponse(commandObj, commandPath, imcode::Success, imcode::Success, imcode::Success, MakeOptional(timeout));
return;
}

imcode commitPresets(Delegate * delegate, EndpointId endpoint)
Expand Down

0 comments on commit 11eda5a

Please sign in to comment.