mirror of
https://github.com/zeldaret/tmc
synced 2026-08-28 08:48:54 -04:00
replace fstream with fmt::print
This commit is contained in:
@@ -1,8 +1,7 @@
|
||||
#include "spriteframe.h"
|
||||
#include "reader.h"
|
||||
#include <fstream>
|
||||
#include <iostream>
|
||||
#include <fmt/format.h>
|
||||
#include <util/file.h>
|
||||
|
||||
void SpriteFrameAsset::convertToHumanReadable(const std::vector<char>& baserom) {
|
||||
Reader reader(baserom, start, size);
|
||||
@@ -18,9 +17,8 @@ void SpriteFrameAsset::convertToHumanReadable(const std::vector<char>& baserom)
|
||||
lines.emplace_back("\n");
|
||||
}
|
||||
|
||||
std::ofstream out(assetPath);
|
||||
auto file = util::open_file(assetPath, "w");
|
||||
for (const auto& line : lines) {
|
||||
out << line;
|
||||
std::fputs(line.c_str(), file.get());
|
||||
}
|
||||
out.close();
|
||||
}
|
||||
Reference in New Issue
Block a user