REmove usage of std::format
This commit is contained in:
parent
fd43f030bb
commit
09637d4db4
2
.gitignore
vendored
2
.gitignore
vendored
@ -4,7 +4,7 @@ out/
|
||||
.vs/
|
||||
.vscode/
|
||||
/assets/
|
||||
|
||||
.cache/
|
||||
.idea/
|
||||
*.log
|
||||
.cxx/
|
||||
|
||||
@ -1,14 +1,13 @@
|
||||
#include "files.hpp"
|
||||
|
||||
#include <fstream>
|
||||
#include <format>
|
||||
|
||||
std::string fs::ReadFileAsString(const std::string& path)
|
||||
{
|
||||
std::ifstream t(path, std::ios::binary);
|
||||
|
||||
if (!t)
|
||||
throw std::runtime_error(std::format("File not found: {}", path));
|
||||
throw std::runtime_error("File not found: " + path);
|
||||
|
||||
t.seekg(0, std::ios::end);
|
||||
size_t size = t.tellg();
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user