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/
|
.vs/
|
||||||
.vscode/
|
.vscode/
|
||||||
/assets/
|
/assets/
|
||||||
|
.cache/
|
||||||
.idea/
|
.idea/
|
||||||
*.log
|
*.log
|
||||||
.cxx/
|
.cxx/
|
||||||
|
|||||||
@ -1,14 +1,13 @@
|
|||||||
#include "files.hpp"
|
#include "files.hpp"
|
||||||
|
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <format>
|
|
||||||
|
|
||||||
std::string fs::ReadFileAsString(const std::string& path)
|
std::string fs::ReadFileAsString(const std::string& path)
|
||||||
{
|
{
|
||||||
std::ifstream t(path, std::ios::binary);
|
std::ifstream t(path, std::ios::binary);
|
||||||
|
|
||||||
if (!t)
|
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);
|
t.seekg(0, std::ios::end);
|
||||||
size_t size = t.tellg();
|
size_t size = t.tellg();
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user