simple refactoring

This commit is contained in:
Mikhail 2024-09-10 19:13:31 +08:00
parent b1ec482266
commit 9567613ed6
7 changed files with 15 additions and 16 deletions

View File

@ -1,5 +1,4 @@
using DCFApixels.DragonECS.PoolsCore;
using System;
using System;
using System.Collections.Generic;
using System.Runtime.Serialization;
using UnityEngine;

View File

@ -124,7 +124,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
public void Save(DragonDocs docs)
{
m_docs = docs;
if(m_isExpands == null || m_isExpands.Length != docs.Metas.Length)
if (m_isExpands == null || m_isExpands.Length != docs.Metas.Length)
{
Array.Resize(ref m_isExpands, docs.Metas.Length);
m_isExpands[0] = true;

View File

@ -72,7 +72,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
System.Array.Resize(ref _searchingHideGroupMap, DragonDocsPrefs.instance.Infos.Length);
}
if(_selectedIndex < 0 || _selectedIndex >= infos.Length)
if (_selectedIndex < 0 || _selectedIndex >= infos.Length)
{
_selectedIndex = 0;
}
@ -332,7 +332,7 @@ namespace DCFApixels.DragonECS.Unity.Docs.Editors
clippingDepth = int.MaxValue;
}
if(_searchingSample.Length == 0)
if (_searchingSample.Length == 0)
{
EditorGUI.indentLevel = groupInfo.Depth;
}

View File

@ -93,7 +93,7 @@ namespace DCFApixels.DragonECS
int lastNewLayersCount = newLayers.Count;
foreach (var pair in builtinLayerIndexes)
{
if(pair.Value < 0)
if (pair.Value < 0)
{
newLayers.Add(pair.Key);
}

View File

@ -55,7 +55,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
var splitedGroup = group.Splited;
Item parent = root;
if(splitedGroup.Count > 0)
if (splitedGroup.Count > 0)
{
int i = 1;
foreach (var subgroup in splitedGroup)

View File

@ -496,7 +496,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
public static bool IconButton(Texture icon, float iconPadding = 0, string description = null, GUIStyle style = null, params GUILayoutOption[] options)
{
bool result;
if(style == null)
if (style == null)
{
result = GUILayout.Button(UnityEditorUtility.GetLabel(string.Empty), options);
}

View File

@ -122,7 +122,7 @@ namespace DCFApixels.DragonECS.Unity.Editors
script = null;
string name = type.Name;
int indexOf = name.LastIndexOf('`');
if(indexOf >= 0)
if (indexOf >= 0)
{
name = name.Substring(0, indexOf);
}