From 6e2c5e1b57210b10f8781f103e5c46308544339f Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 23 Oct 2024 22:23:36 +0200 Subject: more nitpicking --- src/crepe/api/Texture.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) (limited to 'src/crepe/api/Texture.cpp') diff --git a/src/crepe/api/Texture.cpp b/src/crepe/api/Texture.cpp index c755fa9..7791b5b 100644 --- a/src/crepe/api/Texture.cpp +++ b/src/crepe/api/Texture.cpp @@ -1,31 +1,32 @@ +#include +#include "util/log.h" #include "Asset.h" #include "SdlContext.h" -#include "util/log.h" - #include "Texture.h" -#include using namespace crepe::api; +using namespace std; -Texture::Texture(std::unique_ptr res) { +Texture::Texture(unique_ptr res) { dbg_trace(); this->load(std::move(res)); } Texture::Texture(const char * src) { dbg_trace(); - this->load(std::make_unique(src)); + this->load(make_unique(src)); } Texture::~Texture() { dbg_trace(); - if (this->m_texture != nullptr) { - SDL_DestroyTexture(m_texture); + if (this->texture != nullptr) { + SDL_DestroyTexture(this->texture); } } -void Texture::load(std::unique_ptr res) { + +void Texture::load(unique_ptr res) { SdlContext & ctx = SdlContext::get_instance(); - m_texture = ctx.texture_from_path(res->canonical()); + this->texture = ctx.texture_from_path(res->canonical()); } -- cgit v1.2.3