make use of my new small utility library
This commit is contained in:
@@ -33,12 +33,12 @@ void Flash::Load(SaveType saveType, const std::string &path) {
|
||||
saveData.unmap();
|
||||
}
|
||||
|
||||
auto flashVec = Util::ReadFileBinary(flashPath);
|
||||
auto flashVec = ircolib::ReadFileBinary(flashPath);
|
||||
if (flashVec.empty()) {
|
||||
std::vector<u8> dummy{};
|
||||
dummy.resize(FLASH_SIZE);
|
||||
Util::WriteFileBinary(dummy, flashPath);
|
||||
flashVec = Util::ReadFileBinary(flashPath);
|
||||
ircolib::WriteFileBinary(dummy, flashPath);
|
||||
flashVec = ircolib::ReadFileBinary(flashPath);
|
||||
}
|
||||
|
||||
if (flashVec.size() != FLASH_SIZE) {
|
||||
|
||||
Reference in New Issue
Block a user