Skip to content

Commit

Permalink
STYLE: Remove unnecessary using type aliases from enum definitions
Browse files Browse the repository at this point in the history
In C, it might be useful to add such type aliases to `enum`
definitions, but it is unnecessary in C++.

This commit also removed unnecessary empty lines of code from those enum
definitions.
  • Loading branch information
N-Dekker authored and dzenanz committed Apr 25, 2022
1 parent 06808c4 commit 1839cbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 302 deletions.
Expand Up @@ -68,7 +68,11 @@ class ITK_TEMPLATE_EXPORT ComplexToComplex1DFFTImageFilter : public ImageToImage
itkFactoryOnlyNewMacro(Self);

/** Transform direction. */
using TransformDirectionType = enum { DIRECT = 1, INVERSE };
enum TransformDirectionType
{
DIRECT = 1,
INVERSE
};

/** Set/Get the direction in which the transform will be applied.
* By selecting DIRECT, this filter will perform a direct (forward) Fourier
Expand Down
6 changes: 1 addition & 5 deletions Modules/IO/ImageBase/include/itkIOCommon.h
Expand Up @@ -67,14 +67,10 @@ extern ITKIOImageBase_EXPORT std::ostream &
class ITKIOImageBase_EXPORT IOCommon
{
public:
using SysConstants = enum

enum SysConstants
{

ITK_MAXPATHLEN = 2048, /**< Maximum length of a filename */

MAX_FILENAMELIST_SIZE = 512

};

using AtomicPixelEnum = IOCommonEnums::AtomicPixel;
Expand Down

0 comments on commit 1839cbe

Please sign in to comment.