From faed6a22289614b0e96aada3b163252669d42221 Mon Sep 17 00:00:00 2001 From: ouczbs Date: Fri, 26 Apr 2024 16:57:48 +0800 Subject: [PATCH] =?UTF-8?q?refl=20inl=E5=87=BD=E6=95=B0=E5=AE=9A=E4=B9=89?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E5=8A=A0inline=EF=BC=8C=E9=81=BF=E5=85=8D?= =?UTF-8?q?=E9=87=8D=E5=AE=9A=E4=B9=89=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- engine/3rdparty/zlib/include/refl/detail/convert.inl | 4 ++-- engine/3rdparty/zlib/include/refl/detail/field.inl | 6 +++--- engine/3rdparty/zlib/include/refl/detail/view.inl | 10 +++++----- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/engine/3rdparty/zlib/include/refl/detail/convert.inl b/engine/3rdparty/zlib/include/refl/detail/convert.inl index c7da5c0..c85d06a 100644 --- a/engine/3rdparty/zlib/include/refl/detail/convert.inl +++ b/engine/3rdparty/zlib/include/refl/detail/convert.inl @@ -2,7 +2,7 @@ #include #include "convert.h" namespace refl { - bool Convert::ToString(Any& dst, const Any& src) + inline bool Convert::ToString(Any& dst, const Any& src) { if (src.Parent() == &TypeInfo::StaticClass) { std::construct_at(dst.CastTo(), src.CastTo()); @@ -23,7 +23,7 @@ namespace refl { } return it->second(dst, src); } - ConvertMap Convert::BuildClassMap() + inline ConvertMap Convert::BuildClassMap() { ConvertMap classMap; classMap.emplace(&TypeInfo::StaticClass, &ToString); diff --git a/engine/3rdparty/zlib/include/refl/detail/field.inl b/engine/3rdparty/zlib/include/refl/detail/field.inl index 25b31e4..7455487 100644 --- a/engine/3rdparty/zlib/include/refl/detail/field.inl +++ b/engine/3rdparty/zlib/include/refl/detail/field.inl @@ -8,14 +8,14 @@ namespace refl { MemberFunc fptr = (MemberFunc)data.method.fptr; return fptr(std::forward(args)...); } - bool FieldPtr::Invoke(const sarray& ArgsList)const{ + inline bool FieldPtr::Invoke(const sarray& ArgsList)const{ auto Call = type->vtable.Call; if (Call) { Call(this, ArgsList); } return Call; } - bool FieldPtr::Invoke(svector& ArgsList)const { + inline bool FieldPtr::Invoke(svector& ArgsList)const { auto Call = type->vtable.Call; if (Call) { sarray params = GetParams(); @@ -45,7 +45,7 @@ namespace refl { } return Call; } - sarray FieldPtr::GetParams() const { + inline sarray FieldPtr::GetParams() const { auto GetParams = type->vtable.GetParams; if (GetParams) { return GetParams(type); diff --git a/engine/3rdparty/zlib/include/refl/detail/view.inl b/engine/3rdparty/zlib/include/refl/detail/view.inl index b2b68eb..fcbdce3 100644 --- a/engine/3rdparty/zlib/include/refl/detail/view.inl +++ b/engine/3rdparty/zlib/include/refl/detail/view.inl @@ -4,7 +4,7 @@ #include "convert.h" namespace refl { using enum ClassFlag; - bool Any::Check(const UClass* toClass) const{ + inline bool Any::Check(const UClass* toClass) const{ if (cls == toClass) { return true; } @@ -28,7 +28,7 @@ namespace refl { { return cls->parent; } - AnyArgs::AnyArgs(const sarray& args, const sarray& params, void* memory) + inline AnyArgs::AnyArgs(const sarray& args, const sarray& params, void* memory) : data(memory), num(args.size()), size(GetArgsSize(args, params)) { assert(size > 0); @@ -124,7 +124,7 @@ namespace refl { } return false; } - bool AnyView::Invoke(const Name& name,const sarray& ArgsList) + inline bool AnyView::Invoke(const Name& name,const sarray& ArgsList) { auto field = cls->GetField(name, 0); if (!field) { @@ -135,7 +135,7 @@ namespace refl { } return field->Invoke(ArgsList); } - bool AnyView::Invoke(const Name& name, svector& ArgsList) + inline bool AnyView::Invoke(const Name& name, svector& ArgsList) { auto field = cls->GetField(name, 0); if (!field) { @@ -146,7 +146,7 @@ namespace refl { } return field->Invoke(ArgsList); } - AnyView AnyView::Parent() { + inline AnyView AnyView::Parent() { return { ptr, cls ? cls->parent : nullptr }; } } \ No newline at end of file