MCPcopy Create free account
hub / github.com/OpenLoco/OpenLoco / resize

Method resize

src/Core/src/MemoryStream.cpp:33–49  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31 }
32
33 void MemoryStream::resize(size_t len)
34 {
35 if (len == 0)
36 {
37 clear();
38 return;
39 }
40
41 if (len < _capacity)
42 {
43 _length = len;
44 return;
45 }
46
47 reserve(len);
48 _length = len;
49 }
50
51 void MemoryStream::clear()
52 {

Callers 5

getCmdLineVectorFunction · 0.45
getCmdLineVectorFunction · 0.45
TESTFunction · 0.45
to_stringMethod · 0.45

Calls 1

clearFunction · 0.85

Tested by 1

TESTFunction · 0.36