Commit 9f27adc
remove empty destructors so waypoints can be moved
A user-declared destructor, even an empty one, suppresses the implicit
move operations, so waypoint and waypoint_list were silently copy-only:
every Waypoint_lists erase, insert, and reallocation deep-copied entire
lists, and inserting a waypoint mid-path copied every shifted waypoint.
Removing the destructors restores the implicit moves (correct and
noexcept, since the members are vec3d/int and SCP_vector/SCP_string),
turning those shifts into pointer steals. The implicit deep copies
remain available and unchanged. Waypoint identity is index-encoded in
Objects[].instance and renumbered on insert/erase, so relocation
semantics are unaffected.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>1 parent 5c110b5 commit 9f27adc
2 files changed
Lines changed: 0 additions & 12 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
38 | 38 | | |
39 | 39 | | |
40 | 40 | | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | 41 | | |
47 | 42 | | |
48 | 43 | | |
| |||
118 | 113 | | |
119 | 114 | | |
120 | 115 | | |
121 | | - | |
122 | | - | |
123 | | - | |
124 | | - | |
125 | | - | |
126 | 116 | | |
127 | 117 | | |
128 | 118 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
15 | | - | |
16 | 15 | | |
17 | 16 | | |
18 | 17 | | |
| |||
37 | 36 | | |
38 | 37 | | |
39 | 38 | | |
40 | | - | |
41 | 39 | | |
42 | 40 | | |
43 | 41 | | |
| |||
0 commit comments