From 07e396885bf8eab31124f285445a598d02b836b5 Mon Sep 17 00:00:00 2001 From: Gold856 <117957790+Gold856@users.noreply.github.com> Date: Sun, 18 Aug 2024 23:47:52 -0400 Subject: [PATCH] Update wpiutil/src/main/native/cpp/FileLogger.cpp Co-authored-by: Ryan Blue --- wpiutil/src/main/native/cpp/FileLogger.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/wpiutil/src/main/native/cpp/FileLogger.cpp b/wpiutil/src/main/native/cpp/FileLogger.cpp index 46f2df37c32..742d57e9281 100644 --- a/wpiutil/src/main/native/cpp/FileLogger.cpp +++ b/wpiutil/src/main/native/cpp/FileLogger.cpp @@ -28,9 +28,9 @@ FileLogger::FileLogger(std::string_view file, } FileLogger::FileLogger(FileLogger&& other) #ifdef __linux__ - : m_fileHandle{std::move(other.m_fileHandle)}, - m_inotifyHandle{std::move(other.m_inotifyHandle)}, - m_inotifyWatchHandle{std::move(other.m_inotifyWatchHandle)}, + : m_fileHandle{std::exchange(other.m_fileHandle, -1)}, + m_inotifyHandle{std::exchange(other.m_inotifyHandle, -1)}, + m_inotifyWatchHandle{std::exchange(other.m_inotifyWatchHandle, -1)}, m_thread{std::move(other.m_thread)} #endif {