We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents d4e8149 + ea526d0 commit b8c59deCopy full SHA for b8c59de
src/util/tempfile.cpp
@@ -164,5 +164,6 @@ Function: temporary_filet::~temporary_filet
164
165
temporary_filet::~temporary_filet()
166
{
167
- unlink(name.c_str());
+ if(!name.empty())
168
+ unlink(name.c_str());
169
}
src/util/tempfile.h
@@ -32,9 +32,9 @@ class temporary_filet
32
// Using the copy constructor would delete the file twice.
33
temporary_filet(const temporary_filet &)=delete;
34
35
- temporary_filet(temporary_filet &&other) :
36
- name(std::move(other.name))
+ temporary_filet(temporary_filet &&other)
37
+ name.swap(other.name);
38
39
40
// get the name
0 commit comments