Mark move constructors as "noexcept"
[deliverable/binutils-gdb.git] / gdbsupport / scoped_mmap.h
index bab988f364cd020a9ebb72b10350d1efa665c8fe..9b74383fc5018d89337bb0982444d80660b1aa32 100644 (file)
@@ -42,13 +42,10 @@ public:
     destroy ();
   }
 
-  scoped_mmap (scoped_mmap &&rhs)
+  scoped_mmap (scoped_mmap &&rhs) noexcept
+    : m_mem (rhs.m_mem),
+      m_length (rhs.m_length)
   {
-    destroy ();
-
-    m_mem = rhs.m_mem;
-    m_length = rhs.m_length;
-
     rhs.m_mem = MAP_FAILED;
     rhs.m_length = 0;
   }
This page took 0.024358 seconds and 4 git commands to generate.