Cleanup (removing unused variables & other redundancies, rethrowing exceptions instead of wrapping them in a new exception instance)

This commit is contained in:
Regalis
2017-05-20 15:35:13 +03:00
parent 89bd2b1a98
commit e3b595b9e0
40 changed files with 54 additions and 138 deletions
+1 -3
View File
@@ -59,9 +59,7 @@ namespace Barotrauma
public readonly Color OutlineColor;
public readonly Dictionary<GUIComponent.ComponentState, List<UISprite>> Sprites;
public readonly bool TileSprites;
public Dictionary<string, GUIComponentStyle> ChildStyles;
public GUIComponentStyle(XElement element)
+2 -2
View File
@@ -40,7 +40,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.NewMessage("Error in AddToGUIUPdateList! GUIComponent runtime type: "+this.GetType().ToString()+"; children count: "+children.Count.ToString(),Color.Red);
throw e;
throw;
}
}
@@ -427,7 +427,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.NewMessage("Error in Update! GUIComponent runtime type: " + this.GetType().ToString() + "; children count: " + children.Count.ToString(), Color.Red);
throw e;
throw;
}
}
+1 -1
View File
@@ -261,7 +261,7 @@ namespace Barotrauma
catch (Exception e)
{
DebugConsole.NewMessage("Error in AddToGUIUpdateList! GUIComponent runtime type: " + this.GetType().ToString() + "; children count: " + children.Count.ToString(), Color.Red);
throw e;
throw;
}
if (scrollBarEnabled && !scrollBarHidden) scrollBar.AddToGUIUpdateList();