From ec9362c615b5767360ce1d5f7795e0d7cf810ed6 Mon Sep 17 00:00:00 2001 From: PuqiAR Date: Mon, 22 Dec 2025 20:45:47 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0ObjectPtr=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=EF=BC=8C=E5=87=86=E5=A4=87=E5=85=A8=E9=9D=A2=E5=8A=A0=E5=85=A5?= =?UTF-8?q?=E6=8C=87=E9=92=88?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- include/context.hpp | 2 +- include/value.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/context.hpp b/include/context.hpp index a8b104c..cdb8830 100644 --- a/include/context.hpp +++ b/include/context.hpp @@ -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)) { diff --git a/include/value.hpp b/include/value.hpp index 656d355..59b9b58 100644 --- a/include/value.hpp +++ b/include/value.hpp @@ -441,5 +441,5 @@ namespace Fig } }; - using Any = Object; + using ObjectPtr = std::shared_ptr; } // namespace Fig