MCPcopy Create free account
hub / github.com/SIPp/sipp / expand

Method expand

src/variables.cpp:241–258  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

239}
240
241void VariableTable::expand(int size)
242{
243 assert(size > this->size);
244 if (size == this->size) {
245 return;
246 }
247
248 variableTable = (CCallVariable **)realloc(variableTable, size * sizeof(CCallVariable *));
249 if (!variableTable) {
250 ERROR("Could not expand variable table!");
251 }
252
253 for (int i = this->size; i < size; i++) {
254 variableTable[i] = new CCallVariable();
255 }
256
257 this->size = size;
258}
259
260VariableTable::~VariableTable()
261{

Callers

nothing calls this directly

Calls 1

ERRORFunction · 0.85

Tested by

no test coverage detected