From c1b0184b643e2d39f6b5831b2264a2315d018124 Mon Sep 17 00:00:00 2001 From: Username404 Date: Tue, 13 Jun 2023 00:35:09 +0200 Subject: [PATCH] filefuncs.cpp: Simplify the outputFileContent function Signed-off-by: Username404 --- src/etc/filefuncs.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/etc/filefuncs.cpp b/src/etc/filefuncs.cpp index d379fb5..3c549e8 100644 --- a/src/etc/filefuncs.cpp +++ b/src/etc/filefuncs.cpp @@ -17,7 +17,4 @@ string getFileContent(const string& file) } else throw Yerbacon::Exception("Could not open \"" + file + "\" : " + generic_category().message(errno)); } -void outputFileContent(const string& file, const string_view content) { - ofstream outputFile (file, ofstream::out); - outputFile << content; -} \ No newline at end of file +void outputFileContent(const string& file, const string_view content) { ofstream(file, ofstream::out) << content;} \ No newline at end of file