diff --git a/OpenRA.Editor/NewMapDialog.cs b/OpenRA.Editor/NewMapDialog.cs index 199790474c..1845e86ebf 100755 --- a/OpenRA.Editor/NewMapDialog.cs +++ b/OpenRA.Editor/NewMapDialog.cs @@ -19,9 +19,10 @@ namespace OpenRA.Editor InitializeComponent(); } - private void SelectText(object sender, System.EventArgs e) + void SelectText(object sender, System.EventArgs e) { - (sender as NumericUpDown).Select(0, (sender as NumericUpDown).ToString().Length); + var ud = sender as NumericUpDown; + ud.Select(0, ud.ToString().Length); } } } diff --git a/OpenRA.FileFormats/FileFormats/Blast.cs b/OpenRA.FileFormats/FileFormats/Blast.cs index 443b04874c..c83e5ddc31 100644 --- a/OpenRA.FileFormats/FileFormats/Blast.cs +++ b/OpenRA.FileFormats/FileFormats/Blast.cs @@ -158,7 +158,7 @@ namespace OpenRA.FileFormats } // Decode a code using huffman table h. - private static int Decode(Huffman h, BitReader br) + static int Decode(Huffman h, BitReader br) { int code = 0; // len bits being decoded int first = 0; // first code of length len diff --git a/OpenRA.FileFormats/Graphics/ShpReader.cs b/OpenRA.FileFormats/Graphics/ShpReader.cs index 3ff3203224..330a2183ce 100644 --- a/OpenRA.FileFormats/Graphics/ShpReader.cs +++ b/OpenRA.FileFormats/Graphics/ShpReader.cs @@ -63,7 +63,7 @@ namespace OpenRA.FileFormats public Size Size { get { return new Size(Width, Height); } } - private readonly List headers = new List(); + readonly List headers = new List(); int recurseDepth = 0; @@ -156,7 +156,7 @@ namespace OpenRA.FileFormats return compressedBytes; } - private byte[] CopyImageData( byte[] baseImage ) + byte[] CopyImageData( byte[] baseImage ) { byte[] imageData = new byte[ Width * Height ]; for( int i = 0 ; i < Width * Height ; i++ ) diff --git a/OpenRA.Game/Actor.cs b/OpenRA.Game/Actor.cs index 87172130ff..76ca107aa3 100755 --- a/OpenRA.Game/Actor.cs +++ b/OpenRA.Game/Actor.cs @@ -48,7 +48,7 @@ namespace OpenRA [Sync] public Player Owner; - private Activity currentActivity; + Activity currentActivity; public Group Group; internal Actor(World world, string name, TypeDictionary initDict ) diff --git a/OpenRA.Game/Game.cs b/OpenRA.Game/Game.cs index 7129d14d88..fa2b109971 100755 --- a/OpenRA.Game/Game.cs +++ b/OpenRA.Game/Game.cs @@ -32,7 +32,7 @@ namespace OpenRA public static int CellSize { get { return modData.Manifest.TileSize; } } public static ModData modData; - private static WorldRenderer worldRenderer; + static WorldRenderer worldRenderer; public static Viewport viewport; public static Settings Settings; diff --git a/OpenRA.Game/ModData.cs b/OpenRA.Game/ModData.cs index 45e214e60a..03b41b326a 100755 --- a/OpenRA.Game/ModData.cs +++ b/OpenRA.Game/ModData.cs @@ -22,7 +22,7 @@ namespace OpenRA { public readonly Manifest Manifest; public readonly ObjectCreator ObjectCreator; - public Dictionary AvailableMaps {get; private set;} + public Dictionary AvailableMaps { get; private set; } public readonly WidgetLoader WidgetLoader; public ILoadScreen LoadScreen = null; public SheetBuilder SheetBuilder; diff --git a/OpenRA.Game/Player.cs b/OpenRA.Game/Player.cs index a4180cb80b..ea9fab513f 100644 --- a/OpenRA.Game/Player.cs +++ b/OpenRA.Game/Player.cs @@ -26,7 +26,7 @@ namespace OpenRA public int Deaths; public WinState WinState = WinState.Undefined; - public readonly ColorRamp ColorRamp; + public readonly ColorRamp ColorRamp; public readonly string PlayerName; public readonly string InternalName; diff --git a/OpenRA.Game/Widgets/ScrollingTextWidget.cs b/OpenRA.Game/Widgets/ScrollingTextWidget.cs index b0a326eab8..580cc03ea2 100755 --- a/OpenRA.Game/Widgets/ScrollingTextWidget.cs +++ b/OpenRA.Game/Widgets/ScrollingTextWidget.cs @@ -16,7 +16,7 @@ namespace OpenRA.Widgets public class ScrollingTextWidget : Widget { public string Text = ""; - private string ScrollingText = ""; + string ScrollingText = ""; public string Background = null; @@ -27,10 +27,10 @@ namespace OpenRA.Widgets // ticks per single letter scroll public int ScrollRate = 4; - private string ScrollBuffer = ""; + string ScrollBuffer = ""; - private int ScrollLocation = 0; - private int ScrollTick = 0; + int ScrollLocation = 0; + int ScrollTick = 0; public Func GetText; public Func GetBackground; @@ -67,22 +67,18 @@ namespace OpenRA.Widgets ScrollTick = 0; } - private void UpdateScrollBuffer() + void UpdateScrollBuffer() { ScrollTick++; if (ScrollTick < ScrollRate) - { return; - } ScrollTick = 0; ScrollBuffer = ""; if (ScrollingText.Substring(ScrollingText.Length - 4, 3) != " ") - { ScrollingText += " "; - } int tempScrollLocation = ScrollLocation; for (int i = 0; i < ScrollLength; ++i) diff --git a/OpenRA.Game/Widgets/SliderWidget.cs b/OpenRA.Game/Widgets/SliderWidget.cs index c1c29bc6e6..1a2b9f8ff7 100755 --- a/OpenRA.Game/Widgets/SliderWidget.cs +++ b/OpenRA.Game/Widgets/SliderWidget.cs @@ -27,7 +27,7 @@ namespace OpenRA.Widgets // This is bogus public float2 Range = new float2(0f, 1f); - private float Offset = 0; + float Offset = 0; int2 lastMouseLocation; protected bool isMoving = false; diff --git a/OpenRA.Game/Widgets/Widget.cs b/OpenRA.Game/Widgets/Widget.cs index b3fc87faf4..f8cd20467b 100644 --- a/OpenRA.Game/Widgets/Widget.cs +++ b/OpenRA.Game/Widgets/Widget.cs @@ -52,7 +52,7 @@ namespace OpenRA.Widgets get { return rootWidget; } set { rootWidget = value; } } - private static Widget rootWidget = new ContainerWidget(); + static Widget rootWidget = new ContainerWidget(); public Widget(Widget widget) { @@ -401,4 +401,4 @@ namespace OpenRA.Widgets { void Init(); } -} \ No newline at end of file +} diff --git a/OpenRA.Mods.RA/Air/Fly.cs b/OpenRA.Mods.RA/Air/Fly.cs index f598025997..fdc88faa25 100755 --- a/OpenRA.Mods.RA/Air/Fly.cs +++ b/OpenRA.Mods.RA/Air/Fly.cs @@ -19,7 +19,7 @@ namespace OpenRA.Mods.RA.Air { public readonly int2 Pos; - private Fly( int2 px ) { Pos = px; } + Fly( int2 px ) { Pos = px; } public static Fly ToPx( int2 px ) { return new Fly( px ); } public static Fly ToCell( int2 pos ) { return new Fly( Util.CenterOfCell( pos ) ); } diff --git a/OpenRA.Mods.RA/Effects/Contrail.cs b/OpenRA.Mods.RA/Effects/Contrail.cs index 93f0e01db6..5b58587d4a 100755 --- a/OpenRA.Mods.RA/Effects/Contrail.cs +++ b/OpenRA.Mods.RA/Effects/Contrail.cs @@ -29,9 +29,8 @@ namespace OpenRA.Mods.RA class Contrail : ITick, IPostRender { - private ContrailInfo Info = null; - - private Turret ContrailTurret = null; + ContrailInfo Info = null; + Turret ContrailTurret = null; ContrailHistory history; diff --git a/OpenRA.Mods.RA/HackyAI.cs b/OpenRA.Mods.RA/HackyAI.cs index c0486602c2..c92c852ba0 100644 --- a/OpenRA.Mods.RA/HackyAI.cs +++ b/OpenRA.Mods.RA/HackyAI.cs @@ -439,7 +439,7 @@ namespace OpenRA.Mods.RA } //Build a random unit of the given type. Not going to be needed once there is actual AI... - private void BuildRandom(string category) + void BuildRandom(string category) { // Pick a free queue var queue = world.ActorsWithTrait() diff --git a/OpenRA.Mods.RA/Missions/DefaultShellmapScript.cs b/OpenRA.Mods.RA/Missions/DefaultShellmapScript.cs index 72e98b807f..a3f246aa27 100644 --- a/OpenRA.Mods.RA/Missions/DefaultShellmapScript.cs +++ b/OpenRA.Mods.RA/Missions/DefaultShellmapScript.cs @@ -21,7 +21,7 @@ namespace OpenRA.Mods.RA class DefaultShellmapScript: IWorldLoaded, ITick { Dictionary Actors; - private static int2 ViewportOrigin; + static int2 ViewportOrigin; public void WorldLoaded(World w) { diff --git a/OpenRA.Mods.RA/Player/SurrenderOnDisconnect.cs b/OpenRA.Mods.RA/Player/SurrenderOnDisconnect.cs index 518e534c7c..68411a11a1 100644 --- a/OpenRA.Mods.RA/Player/SurrenderOnDisconnect.cs +++ b/OpenRA.Mods.RA/Player/SurrenderOnDisconnect.cs @@ -13,14 +13,11 @@ using OpenRA.Traits; namespace OpenRA.Mods.RA { - class SurrenderOnDisconnectInfo : TraitInfo - { - - } + class SurrenderOnDisconnectInfo : TraitInfo {} class SurrenderOnDisconnect : ITick { - private bool Disconnected = false; + bool Disconnected = false; public void Tick(Actor self) { diff --git a/OpenRA.Mods.RA/ProximityCapturable.cs b/OpenRA.Mods.RA/ProximityCapturable.cs index 4719d37014..7115324550 100644 --- a/OpenRA.Mods.RA/ProximityCapturable.cs +++ b/OpenRA.Mods.RA/ProximityCapturable.cs @@ -87,7 +87,7 @@ namespace OpenRA.Mods.RA } } - private void ChangeOwnership(Actor self, Player previousOwner, Player originalOwner) + void ChangeOwnership(Actor self, Player previousOwner, Player originalOwner) { self.World.AddFrameEndTask(w => { @@ -108,7 +108,7 @@ namespace OpenRA.Mods.RA }); } - private void ChangeOwnership(Actor self, Actor captor, Player previousOwner) + void ChangeOwnership(Actor self, Actor captor, Player previousOwner) { self.World.AddFrameEndTask(w => {