From 6dbf641651e29a5315053bcb66f52a0eb530dae5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Matt=C3=A9o=20Delabre?= Date: Wed, 30 Mar 2016 14:02:06 +0200 Subject: [PATCH] Correction typo dans ResourceManager --- src/resource_manager.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/resource_manager.cpp b/src/resource_manager.cpp index 55cd5cd..fc59cd8 100644 --- a/src/resource_manager.cpp +++ b/src/resource_manager.cpp @@ -19,7 +19,7 @@ ResourceManager::~ResourceManager() { */ std::string getCurrentDirectory() { int length = wai_getExecutablePath(NULL, 0, NULL), dirname_length; - std::unique_ptr buffer = std::unique_ptr(new char[length + 1]); + std::unique_ptr buffer = std::make_unique(length + 1); wai_getExecutablePath(buffer.get(), length, &dirname_length); if (dirname_length == 0) { @@ -56,8 +56,6 @@ sf::Texture& ResourceManager::getTexture(std::string name) { } void ResourceManager::setMusic(std::string name) { - std::string path = getCurrentDirectory() - if (!music.openFromFile(getResourcePath(name))) { throw std::runtime_error("Impossible de charger la musique : " + name); }