Cleanup 5

This commit is contained in:
W2.Wizard
2021-02-21 11:50:30 +01:00
parent ee76440477
commit 694b20148d
30 changed files with 93 additions and 103 deletions

View File

@@ -37,8 +37,7 @@ namespace FlaxEditor.Surface
// Push clipping mask
if (ClipChildren)
{
Rectangle clientArea;
GetDesireClientArea(out clientArea);
GetDesireClientArea(out Rectangle clientArea);
Render2D.PushClip(ref clientArea);
}

View File

@@ -54,8 +54,7 @@ namespace FlaxEditor.Surface
return;
// Get or create context
VisjectSurfaceContext surfaceContext;
if (!_contextCache.TryGetValue(context, out surfaceContext))
if (!_contextCache.TryGetValue(context, out VisjectSurfaceContext surfaceContext))
{
surfaceContext = CreateContext(_context, context);
_context?.Children.Add(surfaceContext);
@@ -119,8 +118,7 @@ namespace FlaxEditor.Surface
}
// Check if has context in cache
VisjectSurfaceContext surfaceContext;
if (_contextCache.TryGetValue(context, out surfaceContext))
if (_contextCache.TryGetValue(context, out VisjectSurfaceContext surfaceContext))
{
// Remove from navigation path
while (ContextStack.Contains(surfaceContext))
@@ -149,8 +147,7 @@ namespace FlaxEditor.Surface
return;
// Check if already in a path
VisjectSurfaceContext surfaceContext;
if (_contextCache.TryGetValue(context, out surfaceContext) && ContextStack.Contains(surfaceContext))
if (_contextCache.TryGetValue(context, out VisjectSurfaceContext surfaceContext) && ContextStack.Contains(surfaceContext))
{
// Change stack
do

View File

@@ -980,10 +980,10 @@ namespace FlaxEditor.Surface
/// <inheritdoc />
public override void OnLayoutDeserialize(XmlElement node)
{
float value1;
if (float.TryParse(node.GetAttribute("Split1"), out value1))
if (float.TryParse(node.GetAttribute("Split1"), out float value1))
_split1.SplitterValue = value1;
if (float.TryParse(node.GetAttribute("Split2"), out value1))
_split2.SplitterValue = value1;
}