| 35 | #pragma clang diagnostic pop |
| 36 | |
| 37 | void RegistrationList::RegisterModule(RegistrationItem* item) |
| 38 | { |
| 39 | for (RegistrationItem* walk = Start(); NotEnd(walk); walk = Advance(walk)) |
| 40 | { |
| 41 | if (item->level <= walk->level) |
| 42 | { |
| 43 | InsertBefore(walk, item); |
| 44 | return; |
| 45 | } |
| 46 | } |
| 47 | |
| 48 | // no existing object has higher level |
| 49 | // we have the highest and we need to be added at the list end |
| 50 | Add(item); |
| 51 | } |
| 52 | |
| 53 | void RegistrationList::InitModules() |
| 54 | { |