From 64952aea9a440b52631c8129f1c868f167b77017 Mon Sep 17 00:00:00 2001 From: Dmitry Marakasov Date: Sat, 27 Dec 2014 02:22:15 +0300 Subject: [PATCH] Use stock function instead of reimplementing with RWops --- SDL2pp/Texture.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/SDL2pp/Texture.cc b/SDL2pp/Texture.cc index 7a57687..9b6ceec 100644 --- a/SDL2pp/Texture.cc +++ b/SDL2pp/Texture.cc @@ -50,8 +50,7 @@ Texture::Texture(Renderer& renderer, RWops& rwops) { } Texture::Texture(Renderer& renderer, const std::string& path) { - RWops rwops = RWops::FromFile(path); - texture_ = IMG_LoadTexture_RW(renderer.Get(), rwops.Get(), 0); + texture_ = IMG_LoadTexture(renderer.Get(), path.c_str()); } #endif