Skip to content
This repository was archived by the owner on Sep 7, 2022. It is now read-only.

Commit d2862d2

Browse files
committed
fix Equals calls on nullable objects
1 parent 625a3d3 commit d2862d2

File tree

4 files changed

+29
-29
lines changed

4 files changed

+29
-29
lines changed

com.unity.uiwidgets/Runtime/material/button_bar_theme.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,8 @@ public bool Equals(ButtonBarThemeData other) {
9999
}
100100

101101
return alignment == other.alignment && mainAxisSize == other.mainAxisSize &&
102-
buttonTextTheme == other.buttonTextTheme && buttonMinWidth.Equals(other.buttonMinWidth) &&
103-
buttonHeight.Equals(other.buttonHeight) && Equals(buttonPadding, other.buttonPadding) &&
102+
buttonTextTheme == other.buttonTextTheme && Equals(buttonMinWidth, other.buttonMinWidth) &&
103+
Equals(buttonHeight, other.buttonHeight) && Equals(buttonPadding, other.buttonPadding) &&
104104
buttonAlignedDropdown == other.buttonAlignedDropdown && layoutBehavior == other.layoutBehavior &&
105105
overflowDirection == other.overflowDirection;
106106
}

com.unity.uiwidgets/Runtime/material/toggle_buttons_theme.cs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -139,21 +139,21 @@ public bool Equals(ToggleButtonsThemeData other) {
139139
return true;
140140
}
141141

142-
return textStyle.Equals(other.textStyle)
143-
&& constraints.Equals(other.constraints)
144-
&& color.Equals(other.color)
145-
&& selectedColor.Equals(other.selectedColor)
146-
&& disabledColor.Equals(other.disabledColor)
147-
&& fillColor.Equals(other.fillColor)
148-
&& focusColor.Equals(other.focusColor)
149-
&& highlightColor.Equals(other.highlightColor)
150-
&& hoverColor.Equals(other.hoverColor)
151-
&& splashColor.Equals(other.splashColor)
152-
&& borderColor.Equals(other.borderColor)
153-
&& selectedBorderColor.Equals(other.selectedBorderColor)
154-
&& disabledBorderColor.Equals(other.disabledBorderColor)
155-
&& borderRadius.Equals(other.borderRadius)
156-
&& borderWidth.Equals(other.borderWidth);
142+
return Equals(textStyle, other.textStyle)
143+
&& Equals(constraints, other.constraints)
144+
&& Equals(color, other.color)
145+
&& Equals(selectedColor, other.selectedColor)
146+
&& Equals(disabledColor,other.disabledColor)
147+
&& Equals(fillColor, other.fillColor)
148+
&& Equals(focusColor, other.focusColor)
149+
&& Equals(highlightColor, other.highlightColor)
150+
&& Equals(hoverColor, other.hoverColor)
151+
&& Equals(splashColor, other.splashColor)
152+
&& Equals(borderColor, other.borderColor)
153+
&& Equals(selectedBorderColor, other.selectedBorderColor)
154+
&& Equals(disabledBorderColor, other.disabledBorderColor)
155+
&& Equals(borderRadius, other.borderRadius)
156+
&& Equals(borderWidth, other.borderWidth);
157157
}
158158

159159

com.unity.uiwidgets/Runtime/material/tooltip_theme.cs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -116,16 +116,16 @@ public bool Equals(TooltipThemeData other)
116116
return true;
117117
}
118118

119-
return height.Equals(other.height)
120-
&& padding.Equals(other.padding)
121-
&& margin.Equals(other.margin)
122-
&& verticalOffset.Equals(other.verticalOffset)
119+
return Equals(height, other.height)
120+
&& Equals(padding, other.padding)
121+
&& Equals(margin, other.margin)
122+
&& Equals(verticalOffset, other.verticalOffset)
123123
&& preferBelow == other.preferBelow
124124
&& excludeFromSemantics == other.excludeFromSemantics
125-
&& decoration.Equals(other.decoration)
126-
&& textStyle.Equals(other.textStyle)
127-
&& waitDuration.Equals(other.waitDuration)
128-
&& showDuration.Equals(other.showDuration);
125+
&& Equals(decoration, other.decoration)
126+
&& Equals(textStyle, other.textStyle)
127+
&& Equals(waitDuration, other.waitDuration)
128+
&& Equals(showDuration, other.showDuration);
129129
}
130130
public override bool Equals(object obj)
131131
{

com.unity.uiwidgets/Runtime/painting/border_radius.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -427,10 +427,10 @@ public bool Equals(BorderRadius other) {
427427
return true;
428428
}
429429

430-
return topLeft.Equals(other.topLeft)
431-
&& topRight.Equals(other.topRight)
432-
&& bottomRight.Equals(other.bottomRight)
433-
&& bottomLeft.Equals(other.bottomLeft);
430+
return Equals(topLeft, topLeft)
431+
&& Equals(topRight, other.topRight)
432+
&& Equals(bottomRight, other.bottomRight)
433+
&& Equals(bottomLeft, other.bottomLeft);
434434
}
435435

436436
public override bool Equals(object obj) {

0 commit comments

Comments
 (0)