From 2fe2d537fc757ec94ba828b4af13265aba5466d9 Mon Sep 17 00:00:00 2001 From: Riyyi Date: Thu, 21 Jan 2021 01:09:38 +0100 Subject: [PATCH] Remove unnecessary c_str() --- inferno/src/inferno/file.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/inferno/src/inferno/file.cpp b/inferno/src/inferno/file.cpp index b0ddd7b..9ff5fb1 100644 --- a/inferno/src/inferno/file.cpp +++ b/inferno/src/inferno/file.cpp @@ -9,8 +9,8 @@ namespace Inferno { std::string File::read(const std::string &path) { // Create input stream object and open file - std::ifstream file(path.c_str()); - ASSERT(file.is_open(), "File could not open: '{}'", path.c_str()); + std::ifstream file(path); + ASSERT(file.is_open(), "File could not open: '{}'", path); // Check if file exists if (!file.is_open()) { @@ -21,7 +21,7 @@ namespace Inferno { file.seekg(0, std::ios::end); int length = file.tellg(); 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 if (length == -1) {