From 9c590e215f145139c9f6717e98e2bdf094e82f70 Mon Sep 17 00:00:00 2001 From: "Admiral H. Curtiss" Date: Wed, 25 Nov 2020 02:59:42 +0100 Subject: [PATCH] IOFile: Add WriteString() method to replace fprintf string writing. --- Source/Core/Common/File.h | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Source/Core/Common/File.h b/Source/Core/Common/File.h index 01b59af257..daa4e90cce 100644 --- a/Source/Core/Common/File.h +++ b/Source/Core/Common/File.h @@ -7,6 +7,7 @@ #include #include #include +#include #include "Common/CommonTypes.h" @@ -67,6 +68,8 @@ public: return WriteArray(reinterpret_cast(data), length); } + bool WriteString(std::string_view str) { return WriteBytes(str.data(), str.size()); } + bool IsOpen() const { return nullptr != m_file; } // m_good is set to false when a read, write or other function fails bool IsGood() const { return m_good; }