Remove unnecessary c_str()

This commit is contained in:
Riyyi
2021-01-21 01:09:38 +01:00
parent a41f8467b4
commit 2fe2d537fc
+3 -3
View File
@@ -9,8 +9,8 @@ namespace Inferno {
std::string File::read(const std::string &path) std::string File::read(const std::string &path)
{ {
// Create input stream object and open file // Create input stream object and open file
std::ifstream file(path.c_str()); std::ifstream file(path);
ASSERT(file.is_open(), "File could not open: '{}'", path.c_str()); ASSERT(file.is_open(), "File could not open: '{}'", path);
// Check if file exists // Check if file exists
if (!file.is_open()) { if (!file.is_open()) {
@@ -21,7 +21,7 @@ namespace Inferno {
file.seekg(0, std::ios::end); file.seekg(0, std::ios::end);
int length = file.tellg(); int length = file.tellg();
file.seekg(0, std::ios::beg); file.seekg(0, std::ios::beg);
ASSERT(length != -1, "File could not determine length: '{}'", path.c_str()); ASSERT(length != -1, "File could not determine length: '{}'", path);
// Check for valid file length // Check for valid file length
if (length == -1) { if (length == -1) {