bugfix
This commit is contained in:
parent
28ebd58bc0
commit
9806bbc67b
@ -28,7 +28,7 @@ namespace refl
|
||||
public int MetaType { get; set; } = 0;
|
||||
public int MemberCount { get; set; } = 0;
|
||||
public int CtorCount { get; set; } = 0;
|
||||
|
||||
public int LastAttrIndex { get; set; } = 0;
|
||||
public List<FieldMetaImplData> FieldList = new List<FieldMetaImplData>();
|
||||
}
|
||||
|
||||
@ -63,6 +63,7 @@ namespace refl
|
||||
{
|
||||
data.FieldList.Add(new FieldMetaImplData(field, 1));
|
||||
}
|
||||
data.LastAttrIndex = data.FieldList.Count;
|
||||
foreach (var field in pair.Value.CtorList)
|
||||
{
|
||||
data.FieldList.Add(new FieldMetaImplData(field, 2));
|
||||
|
||||
@ -4,7 +4,7 @@ namespace gen{
|
||||
consteval static int MemberCount() { return {{MemberCount}}; };
|
||||
consteval static int CtorCount() { return {{CtorCount}}; };
|
||||
consteval static auto Fields(){
|
||||
return std::make_tuple({% for field in FieldList %}FProperty(&T::{{field.Name}},"{{field.Name}}"){% unless forloop.last %}, {% endunless %}{% endfor %});
|
||||
return std::make_tuple({% for field in FieldList limit:LastAttrIndex%}{%- if field.Type == 1 %}FProperty(&T::{{field.Name}},"{{field.Name}}"){% unless forloop.last %}, {% endunless %}{%- endif %}{% endfor %});
|
||||
}
|
||||
static auto MakeFields() {
|
||||
return std::array{
|
||||
|
||||
Loading…
Reference in New Issue
Block a user