diff --git a/code/AssetLib/MMD/MMDImporter.cpp b/code/AssetLib/MMD/MMDImporter.cpp index 4468cb775..4445c2993 100644 --- a/code/AssetLib/MMD/MMDImporter.cpp +++ b/code/AssetLib/MMD/MMDImporter.cpp @@ -52,10 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include #include -#include + #include #include -#include +#include static const aiImporterDesc desc = { "MMD Importer", "", @@ -123,12 +123,12 @@ void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene, } std::vector contents(fileStream->FileSize()); - fileStream->Read(std::data(contents), 1, std::size(contents)); + fileStream->Read(contents.data(), 1, contents.size()); - std::istrstream is(static_cast(std::data(contents)), std::size(contents)); + std::istringstream iss(std::string(contents.begin(), contents.end())); pmx::PmxModel model; - model.Read(&is); + model.Read(&iss); CreateDataFromImport(&model, pScene); }