| 167 | } |
| 168 | |
| 169 | bool add_value(int i){ |
| 170 | RCPP_DEBUG_2( "%s::add_value(%d)", DEMANGLE(IndexHash), i ) |
| 171 | STORAGE val = normalize(src[i++]); |
| 172 | uint32_t addr = get_addr(val) ; |
| 173 | while (data[addr] && not_equal( src[data[addr] - 1], val)) { |
| 174 | addr++; |
| 175 | if (addr == static_cast<uint32_t>(m)) { |
| 176 | addr = 0; |
| 177 | } |
| 178 | } |
| 179 | |
| 180 | if (!data[addr]){ |
| 181 | data[addr] = i ; |
| 182 | size_++ ; |
| 183 | |
| 184 | return true ; |
| 185 | } |
| 186 | return false; |
| 187 | } |
| 188 | |
| 189 | /* NOTE: we are returning a 1-based index ! */ |
| 190 | inline uint32_t get_index(STORAGE value) const { |
nothing calls this directly
no outgoing calls
no test coverage detected