浏览代码

Merge pull request #190 from Unity-Technologies/fix_nullable_equals

fix Equals calls on nullable objects
/main
GitHub 3 年前
当前提交
f90f53e1
共有 4 个文件被更改,包括 29 次插入29 次删除
  1. 4
      com.unity.uiwidgets/Runtime/material/button_bar_theme.cs
  2. 30
      com.unity.uiwidgets/Runtime/material/toggle_buttons_theme.cs
  3. 16
      com.unity.uiwidgets/Runtime/material/tooltip_theme.cs
  4. 8
      com.unity.uiwidgets/Runtime/painting/border_radius.cs

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


}
return alignment == other.alignment && mainAxisSize == other.mainAxisSize &&
buttonTextTheme == other.buttonTextTheme && buttonMinWidth.Equals(other.buttonMinWidth) &&
buttonHeight.Equals(other.buttonHeight) && Equals(buttonPadding, other.buttonPadding) &&
buttonTextTheme == other.buttonTextTheme && Equals(buttonMinWidth, other.buttonMinWidth) &&
Equals(buttonHeight, other.buttonHeight) && Equals(buttonPadding, other.buttonPadding) &&
buttonAlignedDropdown == other.buttonAlignedDropdown && layoutBehavior == other.layoutBehavior &&
overflowDirection == other.overflowDirection;
}

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


return true;
}
return textStyle.Equals(other.textStyle)
&& constraints.Equals(other.constraints)
&& color.Equals(other.color)
&& selectedColor.Equals(other.selectedColor)
&& disabledColor.Equals(other.disabledColor)
&& fillColor.Equals(other.fillColor)
&& focusColor.Equals(other.focusColor)
&& highlightColor.Equals(other.highlightColor)
&& hoverColor.Equals(other.hoverColor)
&& splashColor.Equals(other.splashColor)
&& borderColor.Equals(other.borderColor)
&& selectedBorderColor.Equals(other.selectedBorderColor)
&& disabledBorderColor.Equals(other.disabledBorderColor)
&& borderRadius.Equals(other.borderRadius)
&& borderWidth.Equals(other.borderWidth);
return Equals(textStyle, other.textStyle)
&& Equals(constraints, other.constraints)
&& Equals(color, other.color)
&& Equals(selectedColor, other.selectedColor)
&& Equals(disabledColor,other.disabledColor)
&& Equals(fillColor, other.fillColor)
&& Equals(focusColor, other.focusColor)
&& Equals(highlightColor, other.highlightColor)
&& Equals(hoverColor, other.hoverColor)
&& Equals(splashColor, other.splashColor)
&& Equals(borderColor, other.borderColor)
&& Equals(selectedBorderColor, other.selectedBorderColor)
&& Equals(disabledBorderColor, other.disabledBorderColor)
&& Equals(borderRadius, other.borderRadius)
&& Equals(borderWidth, other.borderWidth);
}

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


return true;
}
return height.Equals(other.height)
&& padding.Equals(other.padding)
&& margin.Equals(other.margin)
&& verticalOffset.Equals(other.verticalOffset)
return Equals(height, other.height)
&& Equals(padding, other.padding)
&& Equals(margin, other.margin)
&& Equals(verticalOffset, other.verticalOffset)
&& decoration.Equals(other.decoration)
&& textStyle.Equals(other.textStyle)
&& waitDuration.Equals(other.waitDuration)
&& showDuration.Equals(other.showDuration);
&& Equals(decoration, other.decoration)
&& Equals(textStyle, other.textStyle)
&& Equals(waitDuration, other.waitDuration)
&& Equals(showDuration, other.showDuration);
}
public override bool Equals(object obj)
{

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


return true;
}
return topLeft.Equals(other.topLeft)
&& topRight.Equals(other.topRight)
&& bottomRight.Equals(other.bottomRight)
&& bottomLeft.Equals(other.bottomLeft);
return Equals(topLeft, topLeft)
&& Equals(topRight, other.topRight)
&& Equals(bottomRight, other.bottomRight)
&& Equals(bottomLeft, other.bottomLeft);
}
public override bool Equals(object obj) {

正在加载...
取消
保存