summaryrefslogtreecommitdiffstats
path: root/Source/cmFileLock.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'Source/cmFileLock.cxx')
-rw-r--r--Source/cmFileLock.cxx12
1 files changed, 2 insertions, 10 deletions
diff --git a/Source/cmFileLock.cxx b/Source/cmFileLock.cxx
index 5d197d2..548e327 100644
--- a/Source/cmFileLock.cxx
+++ b/Source/cmFileLock.cxx
@@ -12,11 +12,7 @@
cmFileLock::cmFileLock(cmFileLock&& other) noexcept
{
this->File = other.File;
-#if defined(_WIN32)
- other.File = INVALID_HANDLE_VALUE;
-#else
- other.File = -1;
-#endif
+ other.File = (decltype(other.File))-1;
this->Filename = std::move(other.Filename);
}
@@ -32,11 +28,7 @@ cmFileLock::~cmFileLock()
cmFileLock& cmFileLock::operator=(cmFileLock&& other) noexcept
{
this->File = other.File;
-#if defined(_WIN32)
- other.File = INVALID_HANDLE_VALUE;
-#else
- other.File = -1;
-#endif
+ other.File = (decltype(other.File))-1;
this->Filename = std::move(other.Filename);
return *this;