Commit 603fcc0
committed
Merge bitcoin/bitcoin#31896: refactor: Remove redundant and confusing calls to IsArgSet
0000fb3 doc: Remove outdated and stale todo comment (MarcoFalke)
fa2b529 refactor: Remove redundant call to IsArgSet (MarcoFalke)
fa29842 refactor: Remove IsArgSet guard when fallback value is provided (MarcoFalke)
Pull request description:
`IsArgSet` is problematic:
* It returns whether an arg has been set, even if it has been negated. `IsArgSet` is sometimes used to check for a truthy value, which is wrong, but usually harmless. Cleanup of those cases may or may not be done in a follow-up.
* In most other cases, calling it is redundant, because the immediately following `Get*Arg` calls can already return an `std::optional` nullopt value to indicate an unset arg.
So relieve both issues by removing all `IsArgSet` that are redundant.
ACKs for top commit:
pablomartin4btc:
re-ACK 0000fb3
ryanofsky:
Code review ACK 0000fb3. No changes since last review other than rebase.
Tree-SHA512: d142d71d136b2dbd5fd005667875099777704176f5e08fdeb38f05d6afce40b435a257c5bb6a1f545459fe4f81f967cee3083ab666cb0befdef3f6234f1e3d32File tree
5 files changed
+42
-45
lines changed- src
- node
- qt
- wallet
5 files changed
+42
-45
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1059 | 1059 | | |
1060 | 1060 | | |
1061 | 1061 | | |
1062 | | - | |
| 1062 | + | |
1063 | 1063 | | |
1064 | 1064 | | |
1065 | 1065 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1036 | 1036 | | |
1037 | 1037 | | |
1038 | 1038 | | |
1039 | | - | |
1040 | | - | |
1041 | | - | |
1042 | | - | |
1043 | | - | |
| 1039 | + | |
| 1040 | + | |
| 1041 | + | |
1044 | 1042 | | |
1045 | 1043 | | |
1046 | 1044 | | |
1047 | | - | |
| 1045 | + | |
1048 | 1046 | | |
1049 | 1047 | | |
1050 | 1048 | | |
1051 | 1049 | | |
1052 | 1050 | | |
1053 | 1051 | | |
1054 | | - | |
| 1052 | + | |
1055 | 1053 | | |
1056 | 1054 | | |
1057 | 1055 | | |
| |||
1183 | 1181 | | |
1184 | 1182 | | |
1185 | 1183 | | |
1186 | | - | |
1187 | | - | |
| 1184 | + | |
1188 | 1185 | | |
1189 | | - | |
1190 | | - | |
| 1186 | + | |
| 1187 | + | |
1191 | 1188 | | |
1192 | 1189 | | |
1193 | 1190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
| 51 | + | |
| 52 | + | |
53 | 53 | | |
54 | 54 | | |
55 | | - | |
| 55 | + | |
56 | 56 | | |
57 | 57 | | |
58 | 58 | | |
59 | | - | |
60 | | - | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
64 | | - | |
| 64 | + | |
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| |||
71 | 71 | | |
72 | 72 | | |
73 | 73 | | |
74 | | - | |
75 | | - | |
| 74 | + | |
| 75 | + | |
76 | 76 | | |
77 | 77 | | |
78 | | - | |
| 78 | + | |
79 | 79 | | |
80 | 80 | | |
81 | 81 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
140 | 140 | | |
141 | 141 | | |
142 | 142 | | |
143 | | - | |
| 143 | + | |
144 | 144 | | |
145 | | - | |
| 145 | + | |
146 | 146 | | |
147 | 147 | | |
148 | 148 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3124 | 3124 | | |
3125 | 3125 | | |
3126 | 3126 | | |
3127 | | - | |
3128 | | - | |
| 3127 | + | |
| 3128 | + | |
3129 | 3129 | | |
3130 | | - | |
| 3130 | + | |
3131 | 3131 | | |
3132 | 3132 | | |
3133 | 3133 | | |
| |||
3137 | 3137 | | |
3138 | 3138 | | |
3139 | 3139 | | |
3140 | | - | |
3141 | | - | |
| 3140 | + | |
| 3141 | + | |
3142 | 3142 | | |
3143 | 3143 | | |
3144 | 3144 | | |
| |||
3153 | 3153 | | |
3154 | 3154 | | |
3155 | 3155 | | |
3156 | | - | |
3157 | | - | |
| 3156 | + | |
| 3157 | + | |
3158 | 3158 | | |
3159 | | - | |
| 3159 | + | |
3160 | 3160 | | |
3161 | 3161 | | |
3162 | 3162 | | |
| |||
3168 | 3168 | | |
3169 | 3169 | | |
3170 | 3170 | | |
3171 | | - | |
3172 | | - | |
| 3171 | + | |
| 3172 | + | |
3173 | 3173 | | |
3174 | | - | |
| 3174 | + | |
3175 | 3175 | | |
3176 | 3176 | | |
3177 | 3177 | | |
| |||
3180 | 3180 | | |
3181 | 3181 | | |
3182 | 3182 | | |
3183 | | - | |
| 3183 | + | |
3184 | 3184 | | |
3185 | 3185 | | |
3186 | | - | |
| 3186 | + | |
3187 | 3187 | | |
3188 | | - | |
| 3188 | + | |
3189 | 3189 | | |
3190 | 3190 | | |
3191 | 3191 | | |
| |||
3196 | 3196 | | |
3197 | 3197 | | |
3198 | 3198 | | |
3199 | | - | |
| 3199 | + | |
3200 | 3200 | | |
3201 | 3201 | | |
3202 | 3202 | | |
3203 | 3203 | | |
3204 | | - | |
3205 | | - | |
| 3204 | + | |
| 3205 | + | |
3206 | 3206 | | |
3207 | | - | |
| 3207 | + | |
3208 | 3208 | | |
3209 | 3209 | | |
3210 | 3210 | | |
3211 | 3211 | | |
3212 | 3212 | | |
3213 | 3213 | | |
3214 | 3214 | | |
3215 | | - | |
| 3215 | + | |
3216 | 3216 | | |
3217 | 3217 | | |
3218 | 3218 | | |
3219 | 3219 | | |
3220 | 3220 | | |
3221 | 3221 | | |
3222 | | - | |
3223 | | - | |
| 3222 | + | |
| 3223 | + | |
3224 | 3224 | | |
3225 | 3225 | | |
3226 | | - | |
| 3226 | + | |
3227 | 3227 | | |
3228 | 3228 | | |
3229 | 3229 | | |
| |||
0 commit comments