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

Method Create

scintilla/src/Decoration.cxx:60–80  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

58}
59
60Decoration *DecorationList::Create(int indicator, int length) {
61 currentIndicator = indicator;
62 Decoration *decoNew = new Decoration(indicator);
63 decoNew->rs.InsertSpace(0, length);
64
65 Decoration *decoPrev = 0;
66 Decoration *deco = root;
67
68 while (deco && (deco->indicator < indicator)) {
69 decoPrev = deco;
70 deco = deco->next;
71 }
72 if (decoPrev == 0) {
73 decoNew->next = root;
74 root = decoNew;
75 } else {
76 decoNew->next = deco;
77 decoPrev->next = decoNew;
78 }
79 return decoNew;
80}
81
82void DecorationList::Delete(int indicator) {
83 Decoration *decoToDelete = 0;

Callers

nothing calls this directly

Calls 1

InsertSpaceMethod · 0.45

Tested by

no test coverage detected