MCPcopy Create free account
hub / github.com/beefytech/Beef / GetData

Method GetData

IDEHelper/Backend/BeModule.cpp:453–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

451}
452
453void BeConstant::GetData(BeConstData& data)
454{
455 auto type = GetType();
456 while ((((int)data.mData.size()) % type->mAlign) != 0)
457 data.mData.push_back(0);
458
459 if (type->IsComposite())
460 {
461 for (int i = 0; i < type->mSize; i++)
462 data.mData.push_back(0); // Aggregate
463 }
464 else if (type->mTypeCode == BeTypeCode_Float)
465 {
466 float f = mDouble;
467 data.mData.Insert(data.mData.mSize, (uint8*)&f, sizeof(float));
468 }
469 else
470 {
471 data.mData.Insert(data.mData.mSize, &mUInt8, type->mSize);
472 }
473}
474
475void BeConstant::HashContent(BeHashContext& hashCtx)
476{

Callers 1

EmitAggMovMethod · 0.45

Calls 4

sizeMethod · 0.45
push_backMethod · 0.45
IsCompositeMethod · 0.45
InsertMethod · 0.45

Tested by

no test coverage detected