Skip to content
This repository was archived by the owner on Apr 29, 2021. It is now read-only.

Commit ca2b422

Browse files
author
Yuncong Zhang
committed
Fix warnings.
1 parent 54b6d32 commit ca2b422

File tree

9 files changed

+15
-3
lines changed

9 files changed

+15
-3
lines changed

Runtime/debugger/diagnostics.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -312,6 +312,8 @@ public List<DiagnosticsNode> inlineProperties {
312312
}
313313
}
314314
}
315+
#pragma warning restore 0659
316+
#pragma warning restore 0661
315317

316318
public class InspectorInstanceRef : IEquatable<InspectorInstanceRef> {
317319
public readonly string id;

Runtime/flow/physical_shape_layer.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ public PhysicalShapeLayer(
1919
Path _path;
2020
#pragma warning disable 0414
2121
bool _isRect;
22+
#pragma warning restore 0414
2223
Rect _frameRRect;
2324
Clip _clip_behavior;
2425

Runtime/foundation/key.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ public static Key key(string value) {
2121
return !Equals(left, right);
2222
}
2323
}
24+
#pragma warning restore 0660
25+
#pragma warning restore 0661
2426

2527
public abstract class LocalKey : Key {
2628
protected LocalKey() {

Runtime/material/slider_theme.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -944,6 +944,7 @@ TextPainter labelPainter
944944
outlinePaint.strokeWidth = 1.0f;
945945
canvas.drawRect(valueRect, outlinePaint);
946946
return true;
947+
#pragma warning restore 0162
947948
});
948949

949950
_addArc(

Runtime/painting/fractional_offset.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ public float dy {
4949
public static readonly FractionalOffset bottomCenter = new FractionalOffset(0.5f, 1.0f);
5050

5151
public static readonly FractionalOffset bottomRight = new FractionalOffset(1.0f, 1.0f);
52+
#pragma warning restore 0108
5253

5354
public static Alignment operator -(FractionalOffset a, Alignment b) {
5455
if (!(b is FractionalOffset)) {

Runtime/rendering/object.mixin.gen.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
namespace Unity.UIWidgets.rendering {
88

99
public abstract class RenderObjectWithChildMixinRenderObject<ChildType> : RenderObject, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
10-
public bool debugValidateChild(RenderObject child) {
10+
public virtual bool debugValidateChild(RenderObject child) {
1111
D.assert(() => {
1212
if (!(child is ChildType)) {
1313
throw new UIWidgetsError(
@@ -88,7 +88,7 @@ public override List<DiagnosticsNode> debugDescribeChildren() {
8888

8989

9090
public abstract class RenderObjectWithChildMixinRenderBox<ChildType> : RenderBox, RenderObjectWithChildMixin<ChildType>, RenderObjectWithChildMixin where ChildType : RenderObject {
91-
public bool debugValidateChild(RenderObject child) {
91+
public virtual bool debugValidateChild(RenderObject child) {
9292
D.assert(() => {
9393
if (!(child is ChildType)) {
9494
throw new UIWidgetsError(
@@ -994,7 +994,7 @@ public int childCount {
994994
get { return this._childCount; }
995995
}
996996

997-
public new bool debugValidateChild(RenderObject child) {
997+
public override bool debugValidateChild(RenderObject child) {
998998
D.assert(() => {
999999
if (!(child is ChildType)) {
10001000
throw new UIWidgetsError(

Runtime/rendering/paragraph.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -253,6 +253,7 @@ public bool hasFocus {
253253

254254
#pragma warning disable 0414
255255
bool _pointerHoverInside;
256+
#pragma warning restore 0414
256257
bool _hasHoverRecognizer;
257258
MouseTrackerAnnotation _hoverAnnotation;
258259

Tests/Editor/SceneViewTests.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ public static void show() {
1515
onPreSceneGUIDelegate += OnPreSceneGUI;
1616
#pragma warning disable 0618
1717
SceneView.onSceneGUIDelegate += OnSceneGUI;
18+
#pragma warning restore 0618
1819
EditorApplication.update += Update;
1920

2021
SceneView.RepaintAll();
@@ -32,6 +33,7 @@ public static void hide() {
3233
onPreSceneGUIDelegate -= OnPreSceneGUI;
3334
#pragma warning disable 0618
3435
SceneView.onSceneGUIDelegate -= OnSceneGUI;
36+
#pragma warning restore 0618
3537
EditorApplication.update -= Update;
3638
SceneView.RepaintAll();
3739
}
@@ -52,6 +54,7 @@ public static SceneView.OnSceneFunc onPreSceneGUIDelegate {
5254
field.SetValue(null, value);
5355
}
5456
}
57+
#pragma warning restore 0618
5558

5659
static Func<Widget>[] _options;
5760

Tests/Editor/Widgets.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -746,6 +746,7 @@ class _EventsWaterfallScreenState : State<EventsWaterfallScreen> {
746746
float _offsetY = 0.0f;
747747
#pragma warning disable 0414
748748
int _index = -1;
749+
#pragma warning restore 0414
749750

750751
Widget _buildHeader(BuildContext context) {
751752
return new Container(

0 commit comments

Comments
 (0)