]> git.ipfire.org Git - thirdparty/pdns.git/commitdiff
Mark the `pdns::UniqueFilePtr` deleter `const noexcept`
authorRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 18 Mar 2024 10:34:09 +0000 (11:34 +0100)
committerRemi Gacogne <remi.gacogne@powerdns.com>
Mon, 18 Mar 2024 10:34:09 +0000 (11:34 +0100)
pdns/misc.cc
pdns/misc.hh

index 71518f1790d06e6ccc160a02c86404089b8eee34..b9e5b4e718c8fb20546d99fb04f613ae05969617 100644 (file)
@@ -1753,7 +1753,7 @@ namespace pdns
 {
 struct CloseDirDeleter
 {
-  void operator()(DIR* dir) {
+  void operator()(DIR* dir) const noexcept {
     closedir(dir);
   }
 };
index 8d63dd54d7a84781eda490ab69fa69916990947f..00667dcf850072f3f99154f297b80fae13bb3f41 100644 (file)
@@ -846,7 +846,7 @@ struct FilePtrDeleter
      - we avoid the annoying "ignoring attributes on template argument ‘int (*)(FILE*)’"
        warning from the compiler, which is there because fclose is tagged as __nonnull((1))
   */
-  void operator()(FILE* filePtr) {
+  void operator()(FILE* filePtr) const noexcept {
     fclose(filePtr);
   }
 };