Commit ae15fd4
merge: small code readability improvement
After our loop through the selected strategies, we compare best_strategy
to wt_strategy. This is fine, but the fact that the code setting
best_strategy sets it to use_strategies[i]->name requires a little bit
of extra checking to determine that at the time of setting, that's the
same as wt_strategy. Just setting best_strategy to wt_strategy makes it
a little easier to verify what the loop is doing, at least for this
reader.
Further, use_strategies[i]->name is used in a number of places, where we
could just use wt_strategy. The latter takes less time for this reader
to parse (one variable name instead of three), so just use wt_strategy
to make the code slightly faster for human readers to parse.
Signed-off-by: Elijah Newren <[email protected]>
Signed-off-by: Junio C Hamano <[email protected]>1 parent 5b1d30c commit ae15fd4
1 file changed
+3
-3
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1707 | 1707 | | |
1708 | 1708 | | |
1709 | 1709 | | |
1710 | | - | |
| 1710 | + | |
1711 | 1711 | | |
1712 | 1712 | | |
1713 | 1713 | | |
| |||
1722 | 1722 | | |
1723 | 1723 | | |
1724 | 1724 | | |
1725 | | - | |
| 1725 | + | |
1726 | 1726 | | |
1727 | 1727 | | |
1728 | 1728 | | |
1729 | 1729 | | |
1730 | | - | |
| 1730 | + | |
1731 | 1731 | | |
1732 | 1732 | | |
1733 | 1733 | | |
| |||
0 commit comments