Преглед на файлове

Add overload for File::ReadText which returns string

Josh Engebretson преди 9 години
родител
ревизия
51319e6cd0
променени са 1 файла, в които са добавени 3 реда и са изтрити 0 реда
  1. 3 0
      Source/Atomic/IO/File.h

+ 3 - 0
Source/Atomic/IO/File.h

@@ -116,6 +116,9 @@ public:
     /// Reads a text file, ensuring data from file is 0 terminated
     virtual void ReadText(String& text);
 
+    /// Reads a text file, ensuring data from file is 0 terminated
+    virtual String ReadText() { String retValue; ReadText(retValue); return retValue; }
+
     /// Return the fullpath to the file
     const String& GetFullPath() const { return fullPath_; }