Explorar o código

String: Make swap method noexcept

There is no reason why it should not be `noexcept`.
`std::swap` cannot have any exceptions or handle any.
Rose hai 1 ano
pai
achega
873b8244f0
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      Source/cmString.hxx

+ 1 - 1
Source/cmString.hxx

@@ -518,7 +518,7 @@ public:
     *this = std::move(s);
   }
 
-  void swap(String& other)
+  void swap(String& other) noexcept
   {
     std::swap(this->string_, other.string_);
     std::swap(this->view_, other.view_);