BGSM Reader: include cleanup, adjust getFile return result

pull/3235/head
Alexei Kotov 8 months ago
parent 77c3cd4467
commit 884668927f

@ -4,7 +4,6 @@
#include <stdexcept>
#include <string>
#include "file.hpp"
#include "stream.hpp"
namespace Bgsm

@ -1,10 +1,7 @@
#ifndef OPENMW_COMPONENTS_BGSM_READER_HPP
#define OPENMW_COMPONENTS_BGSM_READER_HPP
#include <atomic>
#include <cstdint>
#include <memory>
#include <vector>
#include <components/files/istreamptr.hpp>
@ -19,7 +16,7 @@ namespace Bgsm
public:
void parse(Files::IStreamPtr&& stream);
std::unique_ptr<MaterialFile>& getFile() { return mFile; }
std::unique_ptr<MaterialFile> getFile() { return std::move(mFile); }
};
}
#endif

@ -43,7 +43,7 @@ namespace Resource
{
Bgsm::Reader reader;
reader.parse(mVFS->get(name));
Bgsm::MaterialFilePtr file = std::move(reader.getFile());
Bgsm::MaterialFilePtr file = reader.getFile();
obj = new BgsmFileHolder(file);
mCache->addEntryToObjectCache(name.value(), obj);
return file;

Loading…
Cancel
Save