rename sdl_deleter to SDL_Deleter to match library conventions
This commit is contained in:
@@ -1,21 +1,15 @@
|
|||||||
#ifndef YAZE_APP_CORE_UTILS_SDL_DELETER_H_
|
#ifndef YAZE_APP_CORE_UTILS_SDL_DELETER_H_
|
||||||
#define YAZE_APP_CORE_UTILS_SDL_DELETER_H_
|
#define YAZE_APP_CORE_UTILS_SDL_DELETER_H_
|
||||||
|
|
||||||
|
#include <SDL.h>
|
||||||
|
|
||||||
namespace yaze {
|
namespace yaze {
|
||||||
namespace app {
|
namespace app {
|
||||||
namespace core {
|
namespace core {
|
||||||
|
|
||||||
struct sdl_deleter {
|
struct SDL_Deleter {
|
||||||
void operator()(SDL_Window *p) const {
|
void operator()(SDL_Window *p) const { SDL_DestroyWindow(p); }
|
||||||
if (p) {
|
void operator()(SDL_Renderer *p) const { SDL_DestroyRenderer(p); }
|
||||||
SDL_DestroyWindow(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void operator()(SDL_Renderer *p) const {
|
|
||||||
if (p) {
|
|
||||||
SDL_DestroyRenderer(p);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
void operator()(SDL_Texture *p) const { SDL_DestroyTexture(p); }
|
void operator()(SDL_Texture *p) const { SDL_DestroyTexture(p); }
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user