aboutsummaryrefslogtreecommitdiff
path: root/src/crepe/facade/SDLContext.cpp
diff options
context:
space:
mode:
authorLoek Le Blansch <loek@pipeframe.xyz>2024-11-15 20:26:26 +0100
committerLoek Le Blansch <loek@pipeframe.xyz>2024-11-15 20:26:26 +0100
commit5bee4515c1089ce3499bc3b74780db94f0c02306 (patch)
tree3e18158665e45851b92c61095664fc16060c8fd2 /src/crepe/facade/SDLContext.cpp
parent8600b8a29351aae26ec7b22f84aeeef92d8cb421 (diff)
process feedback on #26
Diffstat (limited to 'src/crepe/facade/SDLContext.cpp')
-rw-r--r--src/crepe/facade/SDLContext.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/crepe/facade/SDLContext.cpp b/src/crepe/facade/SDLContext.cpp
index a68d940..65ea962 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 "SDLContext.h"
using namespace crepe;
+using namespace std;
SDLContext & SDLContext::get_instance() {
static SDLContext instance;
@@ -171,7 +170,7 @@ SDLContext::texture_from_path(const std::string & path) {
this->game_renderer.get(), img_surface.get());
if (tmp_texture == nullptr) {
- throw Exception("Texture cannot be load from {}", path);
+ throw runtime_error(format("Texture cannot be load from {}", path));
}
std::unique_ptr<SDL_Texture, std::function<void(SDL_Texture *)>>