Fixed deprecated class usage; removed unsupported C++17 feature

pull/4484/head
RedSkittleFox 2022-04-13 11:38:57 +02:00
parent f26dc74f21
commit 5ab1be8d04
1 changed files with 5 additions and 5 deletions

View File

@ -52,10 +52,10 @@ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#include <assimp/scene.h>
#include <assimp/Importer.hpp>
#include <fstream>
#include <iomanip>
#include <memory>
#include <strstream>
#include <sstream>
static const aiImporterDesc desc = { "MMD Importer",
"",
@ -123,12 +123,12 @@ void MMDImporter::InternReadFile(const std::string &file, aiScene *pScene,
}
std::vector<char> contents(fileStream->FileSize());
fileStream->Read(std::data(contents), 1, std::size(contents));
fileStream->Read(contents.data(), 1, contents.size());
std::istrstream is(static_cast<const char *>(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);
}