MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / getVariantFieldOffset

Method getVariantFieldOffset

src/ast/ast_typedecl.cpp:2960–2967  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2958 }
2959
2960 int TypeDecl::getVariantFieldOffset ( int index ) const {
2961 index;
2962 DAS_ASSERT(baseType==Type::tVariant);
2963 DAS_ASSERT(index>=0 && index<int(argTypes.size()));
2964 int al = getVariantAlign() - 1;
2965 int offset = (getTypeBaseSize(Type::tInt) + al) & ~al;
2966 return offset;
2967 }
2968
2969 int TypeDecl::getVariantUniqueFieldIndex ( const TypeDeclPtr & uniqueType ) const {
2970 int index = -1;

Callers 6

makeMethod · 0.80
setRefSpMethod · 0.80
sv_trySimulate_FieldMethod · 0.80
visitMethod · 0.80
get_variant_field_offsetFunction · 0.80

Calls 3

getVariantAlignFunction · 0.85
getTypeBaseSizeFunction · 0.85
sizeMethod · 0.45

Tested by 1

makeMethod · 0.64