Commit 8fa2d46
authored
Define a search helper to reduce code duplication (#284)
* There should be no meaningful performance degradation
* If there is any impact at all, it will be positive (still not meaningful, though)
* Calling `lower_bound` and then checking for equality preserves the search result.
* Calling `find` requires a comparison with the end pointer, which `find` already did internally after calling `lower_bound`.1 parent 1e1f689 commit 8fa2d46
3 files changed
Lines changed: 31 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
| 227 | + | |
| 228 | + | |
| 229 | + | |
| 230 | + | |
| 231 | + | |
| 232 | + | |
| 233 | + | |
217 | 234 | | |
218 | 235 | | |
219 | 236 | | |
| |||
398 | 415 | | |
399 | 416 | | |
400 | 417 | | |
401 | | - | |
402 | | - | |
| 418 | + | |
| 419 | + | |
403 | 420 | | |
404 | 421 | | |
405 | 422 | | |
| |||
433 | 450 | | |
434 | 451 | | |
435 | 452 | | |
436 | | - | |
437 | | - | |
| 453 | + | |
| 454 | + | |
438 | 455 | | |
439 | 456 | | |
440 | 457 | | |
| |||
460 | 477 | | |
461 | 478 | | |
462 | 479 | | |
463 | | - | |
464 | | - | |
| 480 | + | |
465 | 481 | | |
466 | 482 | | |
467 | 483 | | |
| |||
558 | 574 | | |
559 | 575 | | |
560 | 576 | | |
561 | | - | |
562 | | - | |
| 577 | + | |
| 578 | + | |
563 | 579 | | |
564 | 580 | | |
565 | 581 | | |
| |||
588 | 604 | | |
589 | 605 | | |
590 | 606 | | |
591 | | - | |
592 | | - | |
| 607 | + | |
593 | 608 | | |
594 | 609 | | |
595 | 610 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
| 8 | + | |
7 | 9 | | |
8 | 10 | | |
9 | 11 | | |
| |||
39 | 41 | | |
40 | 42 | | |
41 | 43 | | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
42 | 47 | | |
43 | 48 | | |
44 | 49 | | |
| |||
63 | 68 | | |
64 | 69 | | |
65 | 70 | | |
| 71 | + | |
66 | 72 | | |
67 | 73 | | |
68 | 74 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
6 | | - | |
7 | 6 | | |
8 | 7 | | |
9 | 8 | | |
10 | 9 | | |
11 | | - | |
12 | | - | |
13 | 10 | | |
14 | 11 | | |
15 | 12 | | |
| |||
0 commit comments