Skip to content
Merged

Dev #150

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
2 changes: 1 addition & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ jobs:
- name: zip plugin - net8
shell: bash
run: |
mkdir ./ironbug-rhino7
mkdir ./ironbug-net8
cp ./installer/plugin-net8/* ./ironbug-net8 -r
cp ./installer/HVACTemplates ./ironbug-net8 -r
7z a -tzip ironbug-net8.zip ./ironbug-net8
Expand Down
9 changes: 1 addition & 8 deletions src/Ironbug.HVAC/Loops/IB_PlantLoop.cs
Original file line number Diff line number Diff line change
Expand Up @@ -205,15 +205,8 @@ private bool CheckWithBranch(IEnumerable<IB_HVACObject> HvacComponents)
public bool Equals(IB_PlantLoop other)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

high

Since Equals is being overridden here to include SizingPlant and OperationScheme properties, GetHashCode should also be overridden to include these properties. Currently, IB_PlantLoop inherits GetHashCode from IB_ModelObject, which doesn't account for these properties. This violates the contract that equal objects must have equal hash codes and can lead to incorrect behavior in hash-based collections like Dictionary or HashSet.

A similar issue exists in the base class IB_Loop, which should also override GetHashCode to account for the properties it checks in its Equals method.

{
if (!base.Equals(other))
{
//var otherJ = other?.ToJson();
//var thisJ = this?.ToJson();

return false;
//var same = this.Equals(other);
//return false;
}



if (this.SizingPlant != other.SizingPlant)
return false;
Expand Down
Loading