MCPcopy Create free account
hub / github.com/audacity/audacity / GetData

Method GetData

libraries/lib-utility/MemoryStream.cpp:40–60  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

38}
39
40const void* MemoryStream::GetData() const
41{
42 if (!mChunks.empty())
43 {
44 const size_t desiredSize = GetSize();
45
46 mLinearData.reserve(desiredSize);
47
48 for (const Chunk& chunk : mChunks)
49 {
50 auto begin = chunk.Data.begin();
51 auto end = begin + chunk.BytesUsed;
52
53 mLinearData.insert(mLinearData.end(), begin, end);
54 }
55
56 mChunks = {};
57 }
58
59 return mLinearData.data();
60}
61
62const size_t MemoryStream::GetSize() const noexcept
63{

Callers 12

SaveFXBMethod · 0.45
SaveFXPMethod · 0.45
MaskedImageMethod · 0.45
ChangeImageColourFunction · 0.45
OverlayImageFunction · 0.45
CreateBackgroundFunction · 0.45
PasteSubImageFunction · 0.45
GetSubImageWithAlphaFunction · 0.45
OnUpdateSavedMethod · 0.45
WriteDocMethod · 0.45
ImportMethod · 0.45
InterpretBlobMethod · 0.45

Calls 5

emptyMethod · 0.45
beginMethod · 0.45
insertMethod · 0.45
endMethod · 0.45
dataMethod · 0.45

Tested by

no test coverage detected