From: Remi Gacogne Date: Mon, 18 Mar 2024 10:34:09 +0000 (+0100) Subject: Mark the `pdns::UniqueFilePtr` deleter `const noexcept` X-Git-Tag: rec-5.1.0-alpha1~117^2~3 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=07d4785d49eb93a51818dae5fdbe04e7ff4e128c;p=thirdparty%2Fpdns.git Mark the `pdns::UniqueFilePtr` deleter `const noexcept` --- 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); } };