From 07d4785d49eb93a51818dae5fdbe04e7ff4e128c Mon Sep 17 00:00:00 2001 From: Remi Gacogne Date: Mon, 18 Mar 2024 11:34:09 +0100 Subject: [PATCH] Mark the `pdns::UniqueFilePtr` deleter `const noexcept` --- pdns/misc.cc | 2 +- pdns/misc.hh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pdns/misc.cc b/pdns/misc.cc index 71518f1790..b9e5b4e718 100644 --- a/pdns/misc.cc +++ b/pdns/misc.cc @@ -1753,7 +1753,7 @@ namespace pdns { struct CloseDirDeleter { - void operator()(DIR* dir) { + void operator()(DIR* dir) const noexcept { closedir(dir); } }; diff --git a/pdns/misc.hh b/pdns/misc.hh index 8d63dd54d7..00667dcf85 100644 --- a/pdns/misc.hh +++ b/pdns/misc.hh @@ -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); } }; -- 2.47.2