write shit

This commit is contained in:
2023-09-10 21:33:43 +08:00
parent e907c18f35
commit 1e0ed360bd
12 changed files with 415 additions and 32 deletions

View File

@ -79,6 +79,18 @@ namespace LibCmo::CK2::DataHandlers {
};
/**
* @brief An assist class which can applied to std::unique_ptr as a custom deleter
* to make sure the CKBitmapHandler* can be free correctly.
*/
struct CKBitmapHandlerDeleter {
CKBitmapHandlerDeleter() = default;
CKBitmapHandlerDeleter(const CKBitmapHandlerDeleter&) noexcept {}
void operator()(CKBitmapHandler* handler) {
CKBitmapHandler::ReleaseBitmapHandler(handler);
}
};
class CKBitmapBMPHandler : public CKBitmapHandler {
public:
CKBitmapBMPHandler();