mirror of
https://github.com/AxioDL/nod.git
synced 2025-12-09 05:28:00 +00:00
Merge pull request #11 from lioncash/make
General: Use std::make_unique where applicable
This commit is contained in:
@@ -264,18 +264,19 @@ public:
|
||||
};
|
||||
|
||||
std::unique_ptr<IReadStream> beginReadStream(uint64_t offset) const override {
|
||||
bool Err = false;
|
||||
auto ret = std::unique_ptr<IReadStream>(new ReadStream(*this, NewFileIO(filepath)->beginReadStream(), offset, Err));
|
||||
if (Err)
|
||||
return {};
|
||||
bool err = false;
|
||||
auto ret = std::unique_ptr<IReadStream>(new ReadStream(*this, NewFileIO(filepath)->beginReadStream(), offset, err));
|
||||
|
||||
if (err) {
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::unique_ptr<IWriteStream> beginWriteStream(uint64_t offset) const override {
|
||||
return std::unique_ptr<IWriteStream>();
|
||||
}
|
||||
std::unique_ptr<IWriteStream> beginWriteStream(uint64_t offset) const override { return nullptr; }
|
||||
};
|
||||
|
||||
std::unique_ptr<IDiscIO> NewDiscIOWBFS(SystemStringView path) { return std::unique_ptr<IDiscIO>(new DiscIOWBFS(path)); }
|
||||
std::unique_ptr<IDiscIO> NewDiscIOWBFS(SystemStringView path) { return std::make_unique<DiscIOWBFS>(path); }
|
||||
|
||||
} // namespace nod
|
||||
|
||||
Reference in New Issue
Block a user