Skip to content

Commit db59a1c

Browse files
Merge pull request #1351 from StephenHodgson/MRTK-CompilerCleanup
Compiler messages cleanup
2 parents 620fb50 + d4799c0 commit db59a1c

File tree

3 files changed

+13
-5
lines changed

3 files changed

+13
-5
lines changed

Assets/HoloToolkit/SpatialSound/Scripts/UAudioManager/UAudioManagerBase.cs

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,38 @@
11
// Copyright (c) Microsoft Corporation. All rights reserved.
22
// Licensed under the MIT License. See LICENSE in the project root for license information.
33

4+
using System;
45
using System.Collections;
56
using System.Collections.Generic;
67
using UnityEngine;
8+
using Random = UnityEngine.Random;
79

810
namespace HoloToolkit.Unity
911
{
1012
/// <summary>
1113
/// UAudioManagerBase provides the base functionality for UAudioManager classes.
1214
/// </summary>
1315
/// <typeparam name="TEvent">The type of AudioEvent being managed.</typeparam>
16+
/// <typeparam name="TBank"></typeparam>
1417
/// <remarks>The TEvent type specified must derive from AudioEvent.</remarks>
1518
public partial class UAudioManagerBase<TEvent, TBank> : MonoBehaviour where TEvent : AudioEvent, new() where TBank : AudioBank<TEvent>, new()
1619
{
1720
public TBank[] DefaultBanks = null;
1821

1922
[SerializeField]
20-
[System.Obsolete]
23+
[Obsolete]
2124
protected TEvent[] Events = null;
2225

2326
protected const float InfiniteLoop = -1;
2427
protected List<ActiveEvent> ActiveEvents;
2528

2629
#if UNITY_EDITOR
30+
// Temp disable this obsolete warning until we remove Events field.
31+
// This public editor only field is here for enabling users to export audio events
32+
// into banks for the new paradigm.
33+
#pragma warning disable 612
2734
public TEvent[] EditorEvents { get { return Events; } set { Events = value; } }
35+
#pragma warning restore 612
2836
public List<ActiveEvent> ProfilerEvents { get { return ActiveEvents; } }
2937
#endif
3038

@@ -34,7 +42,7 @@ protected void Awake()
3442
{
3543
ActiveEvents = new List<ActiveEvent>();
3644
LoadedBanks = new List<TBank>(DefaultBanks.Length + 5);
37-
for(int i=0; i<DefaultBanks.Length; i++)
45+
for (int i = 0; i < DefaultBanks.Length; i++)
3846
{
3947
LoadBank(DefaultBanks[i]);
4048
}

Assets/HoloToolkit/UX/Scripts/Lines/LineBaseEditor.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,13 +42,13 @@ protected override void DrawCustomSceneGUI()
4242
// Draw dotted lines regardless of selection
4343
if (drawDottedLine)
4444
{
45-
DrawDottedLine(line, linePreviewResolutionSelected);
45+
DrawDottedLine(line, previewResolution);
4646
}
4747

4848
// Draw rotations only on selected object
4949
if (drawLineRotations && selected)
5050
{
51-
DrawLineRotations(line, linePreviewResolutionSelected);
51+
DrawLineRotations(line, previewResolution);
5252
}
5353

5454
// Draw up vectors only on selected object

Assets/HoloToolkit/UX/Scripts/Lines/Spline.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ protected override void DrawCustomFooter()
279279

280280
Spline line = (Spline)target;
281281

282-
HashSet<int> overlappingPointIndexes = new HashSet<int>();
282+
overlappingPointIndexes.Clear();
283283

284284
if (DrawSectionStart(line.name + " Points", "Point Editing"))
285285
{

0 commit comments

Comments
 (0)