twhl-community / halflife-updated

Half-Life SDK updated to compile under VS2019 and 2022. Check README.md for more information.
Other
382 stars 146 forks source link

Rework CSave & CRestore to eliminate null data pointers #94

Closed SamVanheer closed 2 years ago

SamVanheer commented 2 years ago

CSave and CRestore operate on SAVERESTOREDATA objects. These objects are not allowed to be null, but the save and restore code has redundant checks for them anyway. Rework them to use references and eliminate the possibility of creating instances of these classes with null data pointers.