Commit 24d3660
authored
refactor: Use CollectionsMarshal.SetCount to resize lists (#2945)
Makes code easier to read (as it was before a122c71).
The SetCount implementation looks very similar to the previously used Resize method of FastList.
For value types it just sets the internal count, for reference types it clears the pointers. Both what was done before as well.1 parent b7134af commit 24d3660
File tree
2 files changed
+4
-30
lines changed- sources/engine
- Stride.Engine/Rendering/Compositing
- Stride.Rendering/Rendering
2 files changed
+4
-30
lines changedLines changed: 2 additions & 20 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
471 | 471 | | |
472 | 472 | | |
473 | 473 | | |
474 | | - | |
475 | | - | |
476 | | - | |
477 | | - | |
478 | | - | |
479 | | - | |
480 | | - | |
481 | | - | |
482 | | - | |
483 | | - | |
| 474 | + | |
484 | 475 | | |
485 | 476 | | |
486 | 477 | | |
| |||
849 | 840 | | |
850 | 841 | | |
851 | 842 | | |
852 | | - | |
853 | | - | |
854 | | - | |
855 | | - | |
856 | | - | |
857 | | - | |
858 | | - | |
859 | | - | |
860 | | - | |
861 | | - | |
| 843 | + | |
862 | 844 | | |
863 | 845 | | |
864 | 846 | | |
| |||
Lines changed: 2 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
10 | 10 | | |
11 | 11 | | |
12 | 12 | | |
| 13 | + | |
13 | 14 | | |
14 | 15 | | |
15 | 16 | | |
| |||
285 | 286 | | |
286 | 287 | | |
287 | 288 | | |
288 | | - | |
289 | | - | |
290 | | - | |
291 | | - | |
292 | | - | |
293 | | - | |
294 | | - | |
295 | | - | |
296 | | - | |
297 | | - | |
| 289 | + | |
298 | 290 | | |
299 | 291 | | |
300 | 292 | | |
| |||
0 commit comments