diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 11:26:12 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-14 11:26:12 +0100 | 
| commit | 01c09a196c3f3e5cefaa4119a95a1cdeb7b9c263 (patch) | |
| tree | 5667369a85bd06b683c67de42bf0311c2647912b /src/crepe/Asset.cpp | |
| parent | 6e13510f3c6d4155707f748d237bb1fa05243450 (diff) | |
| parent | 8600b8a29351aae26ec7b22f84aeeef92d8cb421 (diff) | |
merge `loek/cleanup` into `loek/audio`
Diffstat (limited to 'src/crepe/Asset.cpp')
| -rw-r--r-- | src/crepe/Asset.cpp | 16 | 
1 files changed, 6 insertions, 10 deletions
diff --git a/src/crepe/Asset.cpp b/src/crepe/Asset.cpp index 3d4df53..9c41ecb 100644 --- a/src/crepe/Asset.cpp +++ b/src/crepe/Asset.cpp @@ -1,20 +1,16 @@  #include <filesystem>  #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); +// FIXME: restore this +// src(std::filesystem::canonical(src)) +Asset::Asset(const std::string & src) : src(src) { +	this->file = std::ifstream(this->src, std::ios::in | std::ios::binary);  } -const istream & Asset::read() { return this->file; } +istream & Asset::get_stream() { return this->file; } -const char * Asset::canonical() const { return this->src.c_str(); } +const string & Asset::get_canonical() const { return this->src; }  |