From 9e87a556a5f68c5f9bb04bef9a66880536ccd6e8 Mon Sep 17 00:00:00 2001 From: Loek Le Blansch Date: Wed, 13 Nov 2024 13:12:06 +0100 Subject: move more files from `loek/tests` to `loek/audio` --- src/crepe/Asset.cpp | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'src/crepe/Asset.cpp') diff --git a/src/crepe/Asset.cpp b/src/crepe/Asset.cpp index 3d4df53..8a2a11c 100644 --- a/src/crepe/Asset.cpp +++ b/src/crepe/Asset.cpp @@ -1,20 +1,16 @@ #include #include "Asset.h" -#include "Exception.h" using namespace crepe; -using namespace std; -Asset::Asset(const string & src) : src(src) { - try { - this->src = filesystem::canonical(src); - } catch (filesystem::filesystem_error & e) { - throw Exception("Asset error: %s", e.what()); - } - this->file = ifstream(this->src, ios::in | ios::binary); +Asset::Asset(const std::string & src) { + // FIXME: restore this + // this->src = std::filesystem::canonical(src); + this->src = src; + this->file = std::ifstream(this->src, std::ios::in | std::ios::binary); } -const istream & Asset::read() { return this->file; } +const std::istream & Asset::read() { return this->file; } -const char * Asset::canonical() const { return this->src.c_str(); } +const char * Asset::canonical() { return this->src.c_str(); } -- cgit v1.2.3