MCPcopy Create free account
hub / github.com/ProgerXP/Notepad2e / InsertValue

Method InsertValue

scintilla/src/SplitVector.h:169–182  ·  view source on GitHub ↗

Insert a number of elements into the buffer setting their value. Inserting at positions outside the current range fails.

Source from the content-addressed store, hash-verified

167 /// Insert a number of elements into the buffer setting their value.
168 /// Inserting at positions outside the current range fails.
169 void InsertValue(int position, int insertLength, T v) {
170 PLATFORM_ASSERT((position >= 0) && (position <= lengthBody));
171 if (insertLength > 0) {
172 if ((position < 0) || (position > lengthBody)) {
173 return;
174 }
175 RoomFor(insertLength);
176 GapTo(position);
177 std::fill(&body[part1Length], &body[part1Length + insertLength], v);
178 lengthBody += insertLength;
179 part1Length += insertLength;
180 gapLength -= insertLength;
181 }
182 }
183
184 /// Ensure at least length elements allocated,
185 /// appending zero valued elements if needed.

Callers 8

BasicInsertStringMethod · 0.80
AddMarkMethod · 0.80
InsertLineMethod · 0.80
ExpandLevelsMethod · 0.80
SplitRunMethod · 0.80
RunStylesMethod · 0.80
InsertSpaceMethod · 0.80
DeleteAllMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected