Skip to content

Commit

Permalink
COMP: Remove pointer-to-bool conversions from IOFactoryRegisterManager
Browse files Browse the repository at this point in the history
Fixed clang-tidy (LLVM 13.0.0) warnings from the implementation of
`IOFactoryRegisterManager` constructors, saying:

> warning: implicit conversion 'void (*)()' -> bool
> [readability-implicit-bool-conversion]
  • Loading branch information
N-Dekker authored and hjmjohnson committed Oct 15, 2021
1 parent 72782b8 commit 49c910a
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion CMake/itkImageIOFactoryRegisterManager.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class ImageIOFactoryRegisterManager
public:
explicit ImageIOFactoryRegisterManager(void (*list[])(void))
{
for(;*list; ++list)
for(;*list != nullptr; ++list)
{
(*list)();
}
Expand Down
2 changes: 1 addition & 1 deletion CMake/itkMeshIOFactoryRegisterManager.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class MeshIOFactoryRegisterManager
public:
explicit MeshIOFactoryRegisterManager(void (*list[])(void))
{
for(;*list; ++list)
for(;*list != nullptr; ++list)
{
(*list)();
}
Expand Down
2 changes: 1 addition & 1 deletion CMake/itkTransformIOFactoryRegisterManager.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class TransformIOFactoryRegisterManager
public:
explicit TransformIOFactoryRegisterManager(void (*list[])(void))
{
for(;*list; ++list)
for(;*list != nullptr; ++list)
{
(*list)();
}
Expand Down

0 comments on commit 49c910a

Please sign in to comment.