From ab14fb3fcd62a447f8d1737034724990ac80a95d Mon Sep 17 00:00:00 2001 From: Brad Arant Date: Wed, 11 Oct 2023 12:34:36 -0700 Subject: [PATCH] Change return type on File::asZString. --- File.cpp | 5 ++--- File.h | 2 +- 2 files changed, 3 insertions(+), 4 deletions(-) diff --git a/File.cpp b/File.cpp index 0e54e38..e4caa25 100644 --- a/File.cpp +++ b/File.cpp @@ -82,9 +82,8 @@ namespace coreutils { return std::string(buffer, size); } - coreutils::ZString & File::asZString() { - zstring = ZString(buffer, size); - return zstring; + coreutils::ZString File::asZString() { + return ZString(buffer, size); } bool File::eof() { diff --git a/File.h b/File.h index f24502b..73f5e2f 100644 --- a/File.h +++ b/File.h @@ -25,7 +25,7 @@ namespace coreutils { void write(std::string data); void write(coreutils::ZString &data); std::string asString(); - coreutils::ZString& asZString(); + coreutils::ZString asZString(); char *buffer; size_t size; bool eof();