Commit dfb2f9d
refactor,blocks: inline
Similarly, `WriteBlockToDisk` wasn't really extracting a meaningful subset of the `SaveBlockToDisk` functionality, it's tied closely to the only caller (needs the header size twice, recalculated block serializes size, returns multiple branches, mutates parameter).
The inlined code should only differ in these parts (modernization will be done in other commits):
* renamed `blockPos` to `pos` in `SaveBlockToDisk` to match the parameter name;
* changed `return false` to `return FlatFilePos()`.
Also removed remaining references to `SaveBlockToDisk`.
Co-authored-by: Ryan Ofsky <[email protected]>WriteBlockToDisk
1 parent 42bc491 commit dfb2f9d
2 files changed
+21
-37
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
936 | 936 | | |
937 | 937 | | |
938 | 938 | | |
939 | | - | |
940 | | - | |
941 | | - | |
942 | | - | |
943 | | - | |
944 | | - | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
950 | | - | |
951 | | - | |
952 | | - | |
953 | | - | |
954 | | - | |
955 | | - | |
956 | | - | |
957 | | - | |
958 | | - | |
959 | | - | |
960 | 939 | | |
961 | 940 | | |
962 | 941 | | |
| |||
1117 | 1096 | | |
1118 | 1097 | | |
1119 | 1098 | | |
1120 | | - | |
1121 | | - | |
| 1099 | + | |
| 1100 | + | |
1122 | 1101 | | |
1123 | 1102 | | |
1124 | 1103 | | |
1125 | | - | |
| 1104 | + | |
| 1105 | + | |
| 1106 | + | |
| 1107 | + | |
| 1108 | + | |
1126 | 1109 | | |
1127 | 1110 | | |
1128 | 1111 | | |
1129 | | - | |
| 1112 | + | |
| 1113 | + | |
| 1114 | + | |
| 1115 | + | |
| 1116 | + | |
| 1117 | + | |
| 1118 | + | |
| 1119 | + | |
| 1120 | + | |
| 1121 | + | |
| 1122 | + | |
1130 | 1123 | | |
1131 | 1124 | | |
1132 | 1125 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
74 | 74 | | |
75 | 75 | | |
76 | 76 | | |
77 | | - | |
| 77 | + | |
78 | 78 | | |
79 | 79 | | |
80 | 80 | | |
| |||
161 | 161 | | |
162 | 162 | | |
163 | 163 | | |
164 | | - | |
| 164 | + | |
165 | 165 | | |
166 | 166 | | |
167 | 167 | | |
168 | 168 | | |
169 | 169 | | |
170 | 170 | | |
171 | 171 | | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | 172 | | |
181 | 173 | | |
182 | 174 | | |
| |||
346 | 338 | | |
347 | 339 | | |
348 | 340 | | |
349 | | - | |
350 | | - | |
| 341 | + | |
351 | 342 | | |
352 | 343 | | |
353 | 344 | | |
| |||
0 commit comments