diff options
Diffstat (limited to 'src/Decoration.cxx')
-rw-r--r-- | src/Decoration.cxx | 40 |
1 files changed, 20 insertions, 20 deletions
diff --git a/src/Decoration.cxx b/src/Decoration.cxx index ed8b91ddc..4817af304 100644 --- a/src/Decoration.cxx +++ b/src/Decoration.cxx @@ -26,7 +26,7 @@ using namespace Scintilla; #endif -Decoration::Decoration(int indicator_) : next(0), indicator(indicator_) { +Decoration::Decoration(int indicator_) : indicator(indicator_), next(0) { } Decoration::~Decoration() { @@ -43,7 +43,7 @@ DecorationList::DecorationList() : currentIndicator(0), currentValue(1), current DecorationList::~DecorationList() { Decoration *deco = root; while (deco) { - Decoration *decoNext = deco->next; + Decoration *decoNext = deco->Next(); delete deco; deco = decoNext; } @@ -52,8 +52,8 @@ DecorationList::~DecorationList() { } Decoration *DecorationList::DecorationFromIndicator(int indicator) { - for (Decoration *deco=root; deco; deco = deco->next) { - if (deco->indicator == indicator) { + for (Decoration *deco=root; deco; deco = deco->Next()) { + if (deco->Indicator() == indicator) { return deco; } } @@ -68,9 +68,9 @@ Decoration *DecorationList::Create(int indicator, int length) { Decoration *decoPrev = 0; Decoration *deco = root; - while (deco && (deco->indicator < indicator)) { + while (deco && (deco->Indicator() < indicator)) { decoPrev = deco; - deco = deco->next; + deco = deco->Next(); } if (decoPrev == 0) { decoNew->next = root; @@ -85,17 +85,17 @@ Decoration *DecorationList::Create(int indicator, int length) { void DecorationList::Delete(int indicator) { Decoration *decoToDelete = 0; if (root) { - if (root->indicator == indicator) { + if (root->Indicator() == indicator) { decoToDelete = root; - root = root->next; + root = root->Next(); } else { Decoration *deco=root; - while (deco->next && !decoToDelete) { - if (deco->next && deco->next->indicator == indicator) { - decoToDelete = deco->next; - deco->next = decoToDelete->next; + while (deco->Next() && !decoToDelete) { + if (deco->Next() && deco->Next()->Indicator() == indicator) { + decoToDelete = deco->Next(); + deco->next = decoToDelete->Next(); } else { - deco = deco->next; + deco = deco->Next(); } } } @@ -133,7 +133,7 @@ bool DecorationList::FillRange(int &position, int value, int &fillLength) { void DecorationList::InsertSpace(int position, int insertLength) { const bool atEnd = position == lengthDocument; lengthDocument += insertLength; - for (Decoration *deco=root; deco; deco = deco->next) { + for (Decoration *deco=root; deco; deco = deco->Next()) { deco->rs.InsertSpace(position, insertLength); if (atEnd) { deco->rs.FillRange(position, 0, insertLength); @@ -144,7 +144,7 @@ void DecorationList::InsertSpace(int position, int insertLength) { void DecorationList::DeleteRange(int position, int deleteLength) { lengthDocument -= deleteLength; Decoration *deco; - for (deco=root; deco; deco = deco->next) { + for (deco=root; deco; deco = deco->Next()) { deco->rs.DeleteRange(position, deleteLength); } DeleteAnyEmpty(); @@ -154,20 +154,20 @@ void DecorationList::DeleteAnyEmpty() { Decoration *deco = root; while (deco) { if ((lengthDocument == 0) || deco->Empty()) { - Delete(deco->indicator); + Delete(deco->Indicator()); deco = root; } else { - deco = deco->next; + deco = deco->Next(); } } } int DecorationList::AllOnFor(int position) const { int mask = 0; - for (Decoration *deco=root; deco; deco = deco->next) { + for (Decoration *deco=root; deco; deco = deco->Next()) { if (deco->rs.ValueAt(position)) { - if (deco->indicator < INDIC_IME) { - mask |= 1 << deco->indicator; + if (deco->Indicator() < INDIC_IME) { + mask |= 1 << deco->Indicator(); } } } |