File tree Expand file tree Collapse file tree 1 file changed +7
-10
lines changed
Source/Tools/SharpGen/Model Expand file tree Collapse file tree 1 file changed +7
-10
lines changed Original file line number Diff line number Diff line change @@ -43,21 +43,18 @@ public CsStruct(CppStruct cppStruct)
43
43
IsIn = true ;
44
44
IsOut = false ;
45
45
CppElement = cppStruct ;
46
- // Align was not overloaded by MappingRule tag, then we can take the default value
47
- if ( cppStruct != null && Align == 0 )
48
- Align = cppStruct . Align ;
49
46
}
50
47
51
48
protected override void UpdateFromTag ( MappingRule tag )
52
49
{
53
50
base . UpdateFromTag ( tag ) ;
54
- Align = tag . StructPack != null ? tag . StructPack . Value : Align ;
55
- HasMarshalType = tag . StructHasNativeValueType != null ? tag . StructHasNativeValueType . Value : false ;
56
- GenerateAsClass = tag . StructToClass != null ? tag . StructToClass . Value : false ;
57
- HasCustomMarshal = tag . StructCustomMarshal != null ? tag . StructCustomMarshal . Value : false ;
58
- IsStaticMarshal = tag . IsStaticMarshal != null ? tag . IsStaticMarshal . Value : false ;
59
- HasCustomNew = tag . StructCustomNew != null ? tag . StructCustomNew . Value : false ;
60
- IsOut = tag . StructForceMarshalToToBeGenerated != null ? tag . StructForceMarshalToToBeGenerated . Value : false ;
51
+ Align = tag . StructPack ?? 0 ;
52
+ HasMarshalType = tag . StructHasNativeValueType ?? false ;
53
+ GenerateAsClass = tag . StructToClass ?? false ;
54
+ HasCustomMarshal = tag . StructCustomMarshal ?? false ;
55
+ IsStaticMarshal = tag . IsStaticMarshal ?? false ;
56
+ HasCustomNew = tag . StructCustomNew ?? false ;
57
+ IsOut = tag . StructForceMarshalToToBeGenerated ?? false ;
61
58
62
59
// Force a marshalling if a struct need to be treated as a class)
63
60
if ( GenerateAsClass )
You can’t perform that action at this time.
0 commit comments