aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r--src/crepe/facade/SDLContext.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index e72b622..83e91f8 100644
--- a/src/crepe/facade/SDLContext.cpp
+++ b/src/crepe/facade/SDLContext.cpp
@@ -10,17 +10,16 @@
#include <iostream>
#include <memory>
#include <string>
-#include <utility>
#include "../api/Sprite.h"
#include "../api/Texture.h"
#include "../api/Transform.h"
-#include "../util/log.h"
-#include "Exception.h"
+#include "../util/Log.h"
#include "SDLContext.h"
using namespace crepe;
+using namespace std;
SDLContext & SDLContext::get_instance() {
static SDLContext instance;
@@ -160,7 +159,7 @@ SDLContext::texture_from_path(const std::string & path) {
= SDL_CreateTextureFromSurface(this->game_renderer.get(), img_surface.get());
if (tmp_texture == nullptr) {
- throw Exception("Texture cannot be load from %s", path.c_str());
+ throw runtime_error(format("Texture cannot be load from {}", path));
}
std::unique_ptr<SDL_Texture, std::function<void(SDL_Texture *)>> img_texture;