Skip to content

Commit 9d5d6b4

Browse files
committed
fix(UI): 修复文件末尾缺少换行符和初始化问题
修复 IUIFormHelper.cs 和 UIFormHelperBase.cs 文件末尾缺少换行符的问题,确保符合代码规范。 在 OpenUIFormInfo.cs 中,将 m_AssetPath 的初始化从 `string.Empty` 改为默认值,并在 Clear 方法中正确重置 m_AssetPath 和 m_AssetName 字段,避免潜在的引用残留。
1 parent 3cb3f03 commit 9d5d6b4

3 files changed

Lines changed: 5 additions & 3 deletions

File tree

Runtime/UI/IUIFormHelper.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,4 +64,4 @@ public interface IUIFormHelper
6464
/// <param name="uiFormAssetName">界面资源名称。</param>
6565
void ReleaseUIForm(object uiFormAsset, object uiFormInstance, object assetHandle, string uiFormAssetPath, string uiFormAssetName);
6666
}
67-
}
67+
}

Runtime/UI/OpenUIFormInfo.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public sealed class OpenUIFormInfo : IReference
4545
private Type m_FormType;
4646
private object m_AssetHandle;
4747
private bool m_IsFullScreen = false;
48-
private string m_AssetPath = string.Empty;
48+
private string m_AssetPath;
4949
private string m_AssetName;
5050

5151
/// <summary>
@@ -154,6 +154,8 @@ public void Clear()
154154
m_FormType = default;
155155
m_AssetHandle = default;
156156
m_IsFullScreen = default;
157+
m_AssetPath = default;
158+
m_AssetName = default;
157159
}
158160
}
159161
}

Runtime/UIFormHelperBase.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,4 +66,4 @@ public abstract class UIFormHelperBase : MonoBehaviour, IUIFormHelper
6666
/// <param name="uiFormAssetName">界面资源名称。</param>
6767
public abstract void ReleaseUIForm(object uiFormAsset, object uiFormInstance, object assetHandle, string uiFormAssetPath, string uiFormAssetName);
6868
}
69-
}
69+
}

0 commit comments

Comments
 (0)