添加ObjectPtr定义,准备全面加入指针

This commit is contained in:
2025-12-22 20:45:47 +08:00
parent 271846143a
commit ec9362c615
2 changed files with 2 additions and 2 deletions

View File

@@ -115,7 +115,7 @@ namespace Fig
throw RuntimeError(FStringView(std::format("Variable '{}' not defined", name.toBasicString())));
}
}
void def(const FString &name, const TypeInfo &ti, AccessModifier am, const Object &value = Any())
void def(const FString &name, const TypeInfo &ti, AccessModifier am, const Object &value = Object::getNullInstance())
{
if (containsInThisScope(name))
{

View File

@@ -441,5 +441,5 @@ namespace Fig
}
};
using Any = Object;
using ObjectPtr = std::shared_ptr<Object>;
} // namespace Fig