Skip to content

Commit

Permalink
COMP: Fix error: constexpr variable 'ImageIOFactoryRegisterRegisterList'
Browse files Browse the repository at this point in the history
Replaced `constexpr` by `const` in itk*IOFactoryRegisterManager.h.in
files, in order to work around ITK.Windows.Python CI errors at
Azure.fv-az77-327, build Windows_NT-Build2622-master-Python (Visual
Studio 2019 v16.11.4, MSVC 19.29.30136.0) at
https://open.cdash.org/viewBuildError.php?buildid=7515599 saying:

> D:/a/1/s-build/Wrapping/ITKFactoryRegistration\itkImageIOFactoryRegisterManager.h:49:18: error: constexpr variable 'ImageIOFactoryRegisterRegisterList' must be initialized by a constant expression

These errors occurred after pull request #2811
"Fix various Clang-Tidy warnings from the three
itk*IOFactoryRegisterManager.h.in files" commit f56cc7e
"COMP: Add "const" to `IOFactoryRegisterManager` implementations"
  • Loading branch information
N-Dekker committed Oct 19, 2021
1 parent 962b55f commit 3ad34a1
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 @@ -46,7 +46,7 @@ class ImageIOFactoryRegisterManager
// ITK-based applications and not in ITK itself.
//

constexpr void (*ImageIOFactoryRegisterRegisterList[])(void) = {
void (* const ImageIOFactoryRegisterRegisterList[])(void) = {
@LIST_OF_FACTORY_NAMES@
nullptr};
const ImageIOFactoryRegisterManager ImageIOFactoryRegisterManagerInstance(ImageIOFactoryRegisterRegisterList);
Expand Down
2 changes: 1 addition & 1 deletion CMake/itkMeshIOFactoryRegisterManager.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class MeshIOFactoryRegisterManager
// ITK-based applications and not in ITK itself.
//

constexpr void (*MeshIOFactoryRegisterRegisterList[])(void) = {
void (* const MeshIOFactoryRegisterRegisterList[])(void) = {
@LIST_OF_FACTORY_NAMES@
nullptr};
const MeshIOFactoryRegisterManager MeshIOFactoryRegisterManagerInstance(MeshIOFactoryRegisterRegisterList);
Expand Down
2 changes: 1 addition & 1 deletion CMake/itkTransformIOFactoryRegisterManager.h.in
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ class TransformIOFactoryRegisterManager
// ITK-based applications and not in ITK itself.
//

constexpr void (*TransformIOFactoryRegisterRegisterList[])(void) = {
void (* const TransformIOFactoryRegisterRegisterList[])(void) = {
@LIST_OF_FACTORY_NAMES@
nullptr};
const TransformIOFactoryRegisterManager TransformIOFactoryRegisterManagerInstance(TransformIOFactoryRegisterRegisterList);
Expand Down

0 comments on commit 3ad34a1

Please sign in to comment.