Commit fa2e9f2
committed
[ADT] Swap the two variants of DenseMap::doFind (NFC)
doFind itself makes no modification, so we can implement it as a const
function. The only problem is that the non-const version of find
needs to return a modifiable bucket.
This patch "swaps" the constness of doFind. Specifically, the primary
implementation becomes const, preventing accidental modifications.
Then the non-const variant is derived off of the const variant.1 parent b121cdf commit fa2e9f2
1 file changed
+7
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
629 | 629 | | |
630 | 630 | | |
631 | 631 | | |
632 | | - | |
633 | | - | |
| 632 | + | |
| 633 | + | |
| 634 | + | |
634 | 635 | | |
635 | 636 | | |
636 | 637 | | |
| |||
639 | 640 | | |
640 | 641 | | |
641 | 642 | | |
642 | | - | |
| 643 | + | |
643 | 644 | | |
644 | 645 | | |
645 | 646 | | |
| |||
652 | 653 | | |
653 | 654 | | |
654 | 655 | | |
655 | | - | |
656 | | - | |
657 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
658 | 659 | | |
659 | 660 | | |
660 | 661 | | |
| |||
0 commit comments