rename sdl_deleter to SDL_Deleter to match library conventions

This commit is contained in:
scawful
2024-08-09 18:58:39 -04:00
parent 9a2c8ae17a
commit 91357a6107

View File

@@ -1,21 +1,15 @@
#ifndef YAZE_APP_CORE_UTILS_SDL_DELETER_H_
#define YAZE_APP_CORE_UTILS_SDL_DELETER_H_
#include <SDL.h>
namespace yaze {
namespace app {
namespace core {
struct sdl_deleter {
void operator()(SDL_Window *p) const {
if (p) {
SDL_DestroyWindow(p);
}
}
void operator()(SDL_Renderer *p) const {
if (p) {
SDL_DestroyRenderer(p);
}
}
struct SDL_Deleter {
void operator()(SDL_Window *p) const { SDL_DestroyWindow(p); }
void operator()(SDL_Renderer *p) const { SDL_DestroyRenderer(p); }
void operator()(SDL_Texture *p) const { SDL_DestroyTexture(p); }
};