mirror of
https://github.com/wiiu-env/WiiUPluginLoaderBackend.git
synced 2024-11-22 04:39:17 +01:00
Remove debug logs
This commit is contained in:
parent
05ef5246f0
commit
3652eb4204
@ -67,31 +67,23 @@ std::vector<PluginData> PluginDataFactory::loadDir(const std::string &path, MEMH
|
|||||||
|
|
||||||
std::optional<PluginData> PluginDataFactory::load(const std::string &filename, MEMHeapHandle heapHandle) {
|
std::optional<PluginData> PluginDataFactory::load(const std::string &filename, MEMHeapHandle heapHandle) {
|
||||||
// open the file:
|
// open the file:
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
std::ifstream file(filename, std::ios::binary);
|
std::ifstream file(filename, std::ios::binary);
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
if (!file.is_open()) {
|
if (!file.is_open()) {
|
||||||
DEBUG_FUNCTION_LINE("Failed to open %s", filename.c_str());
|
DEBUG_FUNCTION_LINE("Failed to open %s", filename.c_str());
|
||||||
return std::nullopt;
|
return std::nullopt;
|
||||||
}
|
}
|
||||||
// Stop eating new lines in binary mode!!!
|
// Stop eating new lines in binary mode!!!
|
||||||
file.unsetf(std::ios::skipws);
|
file.unsetf(std::ios::skipws);
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
// get its size:
|
// get its size:
|
||||||
std::streampos fileSize;
|
std::streampos fileSize;
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
|
|
||||||
file.seekg(0, std::ios::end);
|
file.seekg(0, std::ios::end);
|
||||||
fileSize = file.tellg();
|
fileSize = file.tellg();
|
||||||
file.seekg(0, std::ios::beg);
|
file.seekg(0, std::ios::beg);
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
|
|
||||||
std::vector<uint8_t> vBuffer;
|
std::vector<uint8_t> vBuffer;
|
||||||
vBuffer.reserve(fileSize);
|
vBuffer.reserve(fileSize);
|
||||||
|
|
||||||
|
|
||||||
DEBUG_FUNCTION_LINE();
|
|
||||||
// read the data:
|
// read the data:
|
||||||
vBuffer.insert(vBuffer.begin(),
|
vBuffer.insert(vBuffer.begin(),
|
||||||
std::istream_iterator<uint8_t>(file),
|
std::istream_iterator<uint8_t>(file),
|
||||||
|
Loading…
Reference in New Issue
Block a user