| 58 | } |
| 59 | |
| 60 | Decoration *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 | |
| 82 | void DecorationList::Delete(int indicator) { |
| 83 | Decoration *decoToDelete = 0; |
nothing calls this directly
no test coverage detected