MCPcopy Create free account
hub / github.com/cxasm/notepad-- / Check

Method Check

src/qscint/scintilla/src/SparseVector.h:137–151  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

135 starts->InsertText(partition, -1);
136 }
137 void Check() const {
138 if (Length() < 0) {
139 throw std::runtime_error("SparseVector: Length can not be negative.");
140 }
141 if (starts->Partitions() < 1) {
142 throw std::runtime_error("SparseVector: Must always have 1 or more partitions.");
143 }
144 if (starts->Partitions() != values->Length() - 1) {
145 throw std::runtime_error("SparseVector: Partitions and values different lengths.");
146 }
147 // The final element can not be set
148 if (values->ValueAt(values->Length() - 1) != T()) {
149 throw std::runtime_error("SparseVector: Unused style at end changed.");
150 }
151 }
152};
153
154}

Callers

nothing calls this directly

Calls 4

TFunction · 0.85
PartitionsMethod · 0.80
LengthMethod · 0.45
ValueAtMethod · 0.45

Tested by

no test coverage detected