File tree Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Expand file tree Collapse file tree 2 files changed +2
-11
lines changed Original file line number Diff line number Diff line change @@ -67,16 +67,6 @@ std::optional<TargetFile> TargetFile::create(std::string_view target,
6767 return std::nullopt ;
6868}
6969
70- TargetFile& TargetFile::operator =(TargetFile&& other) {
71- if (this != &other) {
72- commit ();
73- workingPath = std::move (other.workingPath );
74- targetPath = std::move (other.targetPath );
75- out = std::move (other.out );
76- }
77- return *this ;
78- }
79-
8070void TargetFile::commit () {
8171 if (out.is_open ()) {
8272 out.close ();
Original file line number Diff line number Diff line change @@ -24,7 +24,8 @@ class TargetFile {
2424 ~TargetFile () { commit (); }
2525
2626 TargetFile (TargetFile&& other) = default ;
27- TargetFile& operator =(TargetFile&& other);
27+ // move assignment deleted as non-trivial and not needed
28+ TargetFile& operator =(TargetFile&& other) = delete ;
2829
2930 template <typename T>
3031 TargetFile& operator <<(T&& value) {
You can’t perform that action at this time.
0 commit comments