OpenTTD / OpenTTD

OpenTTD is an open source simulation game based upon Transport Tycoon Deluxe
https://www.openttd.org/
Other
6.02k stars 843 forks source link

Codechange: Use vector for BmpData members, and pass by reference. #12688

Open PeterN opened 2 weeks ago

PeterN commented 2 weeks ago

Motivation / Problem

Manual memory allocation and freeing when reading heightmap BMP files.

Description

Replace raw pointers with std::vectors.

This avoids manual memory management and allows BmpData to clean up after itself.

Limitations

Checklist for review

Some things are not automated, and forgotten often. This list is a reminder for the reviewers.