diff options
| author | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 13:12:06 +0100 | 
|---|---|---|
| committer | Loek Le Blansch <loek@pipeframe.xyz> | 2024-11-13 13:12:06 +0100 | 
| commit | 9e87a556a5f68c5f9bb04bef9a66880536ccd6e8 (patch) | |
| tree | f40b79cc8021772c9d82f3f52e299809c8e0e6cb /src | |
| parent | fac06d488e635583307cd4a916a611500fb64c16 (diff) | |
move more files from `loek/tests` to `loek/audio`loek/tests
Diffstat (limited to 'src')
| -rw-r--r-- | src/crepe/Asset.cpp | 18 | ||||
| -rw-r--r-- | src/crepe/Asset.h | 2 | 
2 files changed, 8 insertions, 12 deletions
| 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 <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); +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(); } diff --git a/src/crepe/Asset.h b/src/crepe/Asset.h index d4e4ba1..0cb5834 100644 --- a/src/crepe/Asset.h +++ b/src/crepe/Asset.h @@ -23,7 +23,7 @@ public:  	//! Get an input stream to the contents of this resource  	const std::istream & read();  	//! Get the canonical path to this resource -	const char * canonical() const; +	const char * canonical();  private:  	std::string src; |