filefuncs.cpp: Simplify the outputFileContent function
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
d41d492686
commit
c1b0184b64
|
@ -17,7 +17,4 @@ string getFileContent(const string& file)
|
||||||
} else throw Yerbacon::Exception("Could not open \"" + file + "\" : " + generic_category().message(errno));
|
} else throw Yerbacon::Exception("Could not open \"" + file + "\" : " + generic_category().message(errno));
|
||||||
}
|
}
|
||||||
|
|
||||||
void outputFileContent(const string& file, const string_view content) {
|
void outputFileContent(const string& file, const string_view content) { ofstream(file, ofstream::out) << content;}
|
||||||
ofstream outputFile (file, ofstream::out);
|
|
||||||
outputFile << content;
|
|
||||||
}
|
|
Loading…
Reference in New Issue