diff options
Diffstat (limited to 'tools/gfx/model.cpp')
| -rw-r--r-- | tools/gfx/model.cpp | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tools/gfx/model.cpp b/tools/gfx/model.cpp index 62e6ec1fd..ce176727b 100644 --- a/tools/gfx/model.cpp +++ b/tools/gfx/model.cpp @@ -195,6 +195,11 @@ RefPtr<TextureResource> loadTextureImage( return texture; } +static std::string makeString(const char* start, const char* end) +{ + return std::string(start, size_t(end - start)); +} + Result ModelLoader::load( char const* inputPath, void** outModel) @@ -208,7 +213,7 @@ Result ModelLoader::load( std::string baseDir; if( auto lastSlash = strrchr(inputPath, '/') ) { - baseDir = std::string(inputPath, lastSlash); + baseDir = makeString(inputPath, lastSlash); } std::string diagnostics; |
