| 170 | //------------------------------------------------------------------------- |
| 171 | |
| 172 | TFork::TFork(const char* data, size_t offset, size_t limit, const ILeafSkipper& skipper) |
| 173 | : Node(data, offset, skipper) |
| 174 | , Data(data) |
| 175 | , Limit(limit) |
| 176 | , CurrentDirection(TDirection(0)) |
| 177 | { |
| 178 | #if COMPTRIE_DATA_CHECK |
| 179 | if (Node.GetOffset() >= Limit - 1) |
| 180 | ythrow yexception() << "gone beyond the limit, data is corrupted"; |
| 181 | #endif |
| 182 | while (CurrentDirection < D_MAX && !HasDirection(CurrentDirection)) { |
| 183 | ++CurrentDirection; |
| 184 | } |
| 185 | } |
| 186 | |
| 187 | bool TFork::operator==(const TFork& rhs) const { |
| 188 | return (Data == rhs.Data && |
nothing calls this directly
no test coverage detected