refactor: 将 getStructLayout 方法改为静态方法

- 修改了 IRBuilderScope 类中的 getStructLayout 方法,将其从实例方法改为静态方法
This commit is contained in:
Luke 2025-09-01 10:50:39 +08:00
parent 0cb8abde80
commit 04b43cbd5a

View File

@ -217,7 +217,7 @@ final class IRBuilderScope {
* @param structName 结构体名 * @param structName 结构体名
* @return 字段名到下标映射的只读视图 null * @return 字段名到下标映射的只读视图 null
*/ */
Map<String, Integer> getStructLayout(String structName) { static Map<String, Integer> getStructLayout(String structName) {
Map<String, Integer> layout = STRUCT_LAYOUTS.get(structName); Map<String, Integer> layout = STRUCT_LAYOUTS.get(structName);
if (layout == null && structName != null) { if (layout == null && structName != null) {
int dot = structName.lastIndexOf('.'); int dot = structName.lastIndexOf('.');