Skip to content

Commit

Permalink
Tidy up file.cpp
Browse files Browse the repository at this point in the history
  • Loading branch information
bugdea1er committed Jan 28, 2024
1 parent ad06a04 commit 838c885
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions lib/file.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,12 @@ std::ofstream stream(const tmp::file& file, bool binary, bool append) noexcept {

namespace tmp {

file::file(std::string_view prefix) : file(prefix, /*binary=*/true) {
}
file::file(std::string_view prefix)
: file(prefix, /*binary=*/true) {}

file::file(std::string_view prefix, bool binary)
: path(create(prefix)),
binary(binary) {}

file file::text(std::string_view prefix) {
return file(prefix, /*binary=*/false);
Expand All @@ -60,9 +64,4 @@ file::~file() noexcept = default;

file::file(file&&) noexcept = default;
file& file::operator=(file&&) noexcept = default;

file::file(std::string_view prefix, bool binary) : path(create(prefix)),
binary(binary) {
}

} // namespace tmp

0 comments on commit 838c885

Please sign in to comment.