MCPcopy Create free account
hub / github.com/Illumina/paragraph / resize

Method resize

external/jsoncpp/jsoncpp.cpp:3452–3468  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3450}
3451
3452void Value::resize(ArrayIndex newSize) {
3453 JSON_ASSERT_MESSAGE(type_ == nullValue || type_ == arrayValue,
3454 "in Json::Value::resize(): requires arrayValue");
3455 if (type_ == nullValue)
3456 *this = Value(arrayValue);
3457 ArrayIndex oldSize = size();
3458 if (newSize == 0)
3459 clear();
3460 else if (newSize > oldSize)
3461 (*this)[newSize - 1];
3462 else {
3463 for (ArrayIndex index = newSize; index < oldSize; ++index) {
3464 value_.map_->erase(index);
3465 }
3466 JSON_ASSERT(size() == newSize);
3467 }
3468}
3469
3470Value& Value::operator[](ArrayIndex index) {
3471 JSON_ASSERT_MESSAGE(

Callers 15

fitMethod · 0.80
initializeGraphMethod · 0.80
getIndexBinsFunction · 0.80
relabelMethod · 0.80
reportConsensusGenotypesFunction · 0.80
genotypeByTotalCountsFunction · 0.80
genotypeMethod · 0.80
genotypeLikelihoodMethod · 0.80
resetMethod · 0.80
addCountsMethod · 0.80
PopulationStatisticsMethod · 0.80
loadManifestFunction · 0.80

Calls 1

ValueClass · 0.50

Tested by

no test coverage detected