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 reusable temporary buffer in Win32FontCache. #12666

Closed PeterN closed 2 weeks ago

PeterN commented 2 weeks ago

Motivation / Problem

Manual new[]/delete[] in Win32FontCache.

Description

Use ReusableBuffer instead. This removes the manual management (or at least moves it somewhere else...) and avoids allocating and deleting a temporary buffer for every glyph that is rendered into a sprite.

Limitations

Checklist for review

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