Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix compile error on older g++ #34630

Merged
merged 1 commit into from
Jul 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ class WaterHeaterManagementDelegate : public WaterHeaterManagement::Delegate
* @param percentageReplaced The % of water being replaced with water with a temperature of replacedWaterTemperature.
* @param replacedWaterTemperature The temperature of the percentageReplaced water.
*/
void DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature);
void DrawOffHotWater(chip::Percent percentageReplaced, uint16_t replacedWaterTemperature);
tcarmelveilleux marked this conversation as resolved.
Show resolved Hide resolved

private:
/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ void WaterHeaterManagementDelegate::SetTargetWaterTemperature(uint16_t targetWat
CheckIfHeatNeedsToBeTurnedOnOrOff();
}

void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced, uint16_t replacedWaterTemperature)
void WaterHeaterManagementDelegate::DrawOffHotWater(Percent percentageReplaced, uint16_t replacedWaterTemperature)
{
// Only supported in the kTankPercent is supported.
// Replaces percentageReplaced% of the water in the tank with water of a temperature replacedWaterTemperature
Expand All @@ -303,7 +303,7 @@ void WaterHeaterManagementDelegate::DrawOffHotWater(uint8_t percentageReplaced,
// See if all of the water has now been replaced with replacedWaterTemperature
if (mTankPercentage >= percentageReplaced)
{
mTankPercentage -= percentageReplaced;
mTankPercentage = static_cast<Percent>(mTankPercentage - percentageReplaced);
}
else
{
Expand Down
Loading