Skip to content

Commit

Permalink
Mark the pdns::UniqueFilePtr deleter const noexcept
Browse files Browse the repository at this point in the history
  • Loading branch information
rgacogne committed Mar 18, 2024
1 parent 46c4985 commit 07d4785
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pdns/misc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1753,7 +1753,7 @@ namespace pdns
{
struct CloseDirDeleter
{
void operator()(DIR* dir) {
void operator()(DIR* dir) const noexcept {
closedir(dir);
}
};
Expand Down
2 changes: 1 addition & 1 deletion pdns/misc.hh
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
};
Expand Down

0 comments on commit 07d4785

Please sign in to comment.