Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

STYLE: Disable clang-format style option AlignConsecutiveDeclarations #5096

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
2 changes: 1 addition & 1 deletion .clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AlignConsecutiveBitFields:
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: true
N-Dekker marked this conversation as resolved.
Show resolved Hide resolved
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
Expand Down
2 changes: 1 addition & 1 deletion Examples/.clang-format
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ AlignConsecutiveBitFields:
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: true
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
Expand Down
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Image/Image4.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
const ImageType::IndexType LeftEyeIndex = GetIndexFromMouseClick();
ImageType::PointType LeftEyePoint;
ImageType::PointType LeftEyePoint;
image->TransformIndexToPhysicalPoint(LeftEyeIndex, LeftEyePoint);
// Software Guide : EndCodeSnippet

Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Image/Image5.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ main(int argc, char * argv[])

// Software Guide : BeginCodeSnippet
const unsigned int numberOfPixels = size[0] * size[1] * size[2];
auto * localBuffer = new PixelType[numberOfPixels];
auto * localBuffer = new PixelType[numberOfPixels];
// Software Guide : EndCodeSnippet

constexpr double radius = 80.0;
Expand All @@ -181,7 +181,7 @@ main(int argc, char * argv[])

// Software Guide : BeginCodeSnippet
constexpr double radius2 = radius * radius;
PixelType * it = localBuffer;
PixelType * it = localBuffer;

for (unsigned int z = 0; z < size[2]; ++z)
{
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Image/RGBImage.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,12 @@ main(int, char * argv[])
using ReaderType = itk::ImageFileReader<ImageType>;
// Software Guide : EndCodeSnippet

auto reader = ReaderType::New();
auto reader = ReaderType::New();
const char * const filename = argv[1];
reader->SetFileName(filename);
reader->Update();

const ImageType::Pointer image = reader->GetOutput();
const ImageType::Pointer image = reader->GetOutput();
constexpr ImageType::IndexType pixelIndex = { { 25, 35, 0 } };

// Software Guide : BeginLatex
Expand Down
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Mesh/AutomaticMesh.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ main(int, char *[])
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
PointType p;
PointType p;
IdentifierArrayType idArray(4);

p[0] = -2;
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Mesh/Mesh2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ main(int, char *[])
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
CellIterator cellIterator = mesh->GetCells()->Begin();
CellIterator cellIterator = mesh->GetCells()->Begin();
const CellIterator end = mesh->GetCells()->End();
// Software Guide : EndCodeSnippet

Expand Down Expand Up @@ -326,7 +326,7 @@ main(int, char *[])
while (cellIterator != end)
{
MeshType::CellType * cellptr = cellIterator.Value();
auto * line = dynamic_cast<LineType *>(cellptr);
auto * line = dynamic_cast<LineType *>(cellptr);
if (line == nullptr)
{
continue;
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Mesh/Mesh3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
CellType::CellAutoPointer line;
constexpr unsigned int numberOfCells = numberOfPoints - 1;
constexpr unsigned int numberOfCells = numberOfPoints - 1;
for (unsigned int cellId = 0; cellId < numberOfCells; ++cellId)
{
line.TakeOwnership(new LineType);
Expand Down Expand Up @@ -218,7 +218,7 @@ main(int, char *[])
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
CellDataIterator cellDataIterator = mesh->GetCellData()->Begin();
CellDataIterator cellDataIterator = mesh->GetCellData()->Begin();
const CellDataIterator end = mesh->GetCellData()->End();
// Software Guide : EndCodeSnippet

Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Mesh/MeshCellVisitor2.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,8 @@ class CustomLineVisitor
{
std::cout << "cell " << cellId << " is a Line " << std::endl;
LineType::PointIdIterator pit = t->PointIdsBegin();
MeshType::PointType p0;
MeshType::PointType p1;
MeshType::PointType p0;
MeshType::PointType p1;
m_Mesh->GetPoint(*pit++, &p0);
m_Mesh->GetPoint(*pit++, &p1);
const double length = p0.EuclideanDistanceTo(p1);
Expand Down
10 changes: 5 additions & 5 deletions Examples/DataRepresentation/Mesh/MeshKComplex.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -331,7 +331,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointIterator = MeshType::PointsContainer::ConstIterator;
PointIterator pointIterator = mesh->GetPoints()->Begin();
PointIterator pointIterator = mesh->GetPoints()->Begin();
const PointIterator pointEnd = mesh->GetPoints()->End();

while (pointIterator != pointEnd)
Expand Down Expand Up @@ -602,7 +602,7 @@ main(int, char *[])
for (unsigned int b0 = 0; b0 < n0; ++b0)
{
MeshType::CellIdentifier id;
const bool found =
const bool found =
mesh->GetBoundaryAssignment(dimension, cellId, b0, &id);
if (found)
std::cout << id << std::endl;
Expand All @@ -614,7 +614,7 @@ main(int, char *[])
for (unsigned int b1 = 0; b1 < n1; ++b1)
{
MeshType::CellIdentifier id;
const bool found =
const bool found =
mesh->GetBoundaryAssignment(dimension, cellId, b1, &id);
if (found)
{
Expand All @@ -627,7 +627,7 @@ main(int, char *[])
for (unsigned int b2 = 0; b2 < n2; ++b2)
{
MeshType::CellIdentifier id;
const bool found =
const bool found =
mesh->GetBoundaryAssignment(dimension, cellId, b2, &id);
if (found)
{
Expand Down Expand Up @@ -660,7 +660,7 @@ main(int, char *[])
for (unsigned int b1 = 0; b1 < n1; ++b1)
{
MeshType::CellIdentifier id;
const bool found =
const bool found =
mesh->GetBoundaryAssignment(dimension, cellId, b1, &id);
if (found)
{
Expand Down
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Mesh/MeshPolyLine.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointIterator = MeshType::PointsContainer::ConstIterator;
PointIterator pointIterator = mesh->GetPoints()->Begin();
PointIterator pointIterator = mesh->GetPoints()->Begin();
const PointIterator pointEnd = mesh->GetPoints()->End();

while (pointIterator != pointEnd)
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Mesh/MeshTraits.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
CellType::CellAutoPointer line;
constexpr unsigned int numberOfCells = numberOfPoints - 1;
constexpr unsigned int numberOfCells = numberOfPoints - 1;
for (unsigned int cellId = 0; cellId < numberOfCells; ++cellId)
{
line.TakeOwnership(new LineType);
Expand Down Expand Up @@ -278,7 +278,7 @@ main(int, char *[])
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
CellDataIterator cellDataIterator = mesh->GetCellData()->Begin();
CellDataIterator cellDataIterator = mesh->GetCellData()->Begin();
const CellDataIterator end = mesh->GetCellData()->End();
// Software Guide : EndCodeSnippet

Expand Down
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Mesh/PointSet1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ main(int, char *[])
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
PointType pp;
PointType pp;
const bool pointExists = pointsSet->GetPoint(1, &pp);

if (pointExists)
Expand Down
2 changes: 1 addition & 1 deletion Examples/DataRepresentation/Mesh/PointSet3.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
unsigned int dataId = 0;
PixelType value = 79;
PixelType value = 79;
pointSet->SetPointData(dataId++, value);
// Software Guide : EndCodeSnippet

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ main(int, char *[])
PointSetType::PixelType gradient;
PointSetType::PointType point;

unsigned int pointId = 0;
unsigned int pointId = 0;
constexpr double radius = 300.0;

for (unsigned int i = 0; i < 360; ++i)
Expand Down Expand Up @@ -139,7 +139,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointDataIterator = PointSetType::PointDataContainer::ConstIterator;
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
const PointDataIterator pixelEnd = pointSet->GetPointData()->End();

using PointIterator = PointSetType::PointsContainer::Iterator;
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Mesh/PointSetWithVectors.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ main(int, char *[])
PointSetType::PixelType tangent;
PointSetType::PointType point;

unsigned int pointId = 0;
unsigned int pointId = 0;
constexpr double radius = 300.0;

for (unsigned int i = 0; i < 360; ++i)
Expand Down Expand Up @@ -133,7 +133,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointDataIterator = PointSetType::PointDataContainer::ConstIterator;
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
const PointDataIterator pixelEnd = pointSet->GetPointData()->End();

using PointIterator = PointSetType::PointsContainer::Iterator;
Expand Down
8 changes: 4 additions & 4 deletions Examples/DataRepresentation/Mesh/RGBPointSet.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -77,8 +77,8 @@ main(int, char *[])
// Software Guide : BeginCodeSnippet
PointSetType::PixelType pixel;
PointSetType::PointType point;
unsigned int pointId = 0;
constexpr double radius = 3.0;
unsigned int pointId = 0;
constexpr double radius = 3.0;

for (unsigned int i = 0; i < 360; ++i)
{
Expand Down Expand Up @@ -108,7 +108,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointIterator = PointSetType::PointsContainer::ConstIterator;
PointIterator pointIterator = pointSet->GetPoints()->Begin();
PointIterator pointIterator = pointSet->GetPoints()->Begin();
const PointIterator pointEnd = pointSet->GetPoints()->End();
while (pointIterator != pointEnd)
{
Expand Down Expand Up @@ -142,7 +142,7 @@ main(int, char *[])

// Software Guide : BeginCodeSnippet
using PointDataIterator = PointSetType::PointDataContainer::ConstIterator;
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
PointDataIterator pixelIterator = pointSet->GetPointData()->Begin();
const PointDataIterator pixelEnd = pointSet->GetPointData()->End();
while (pixelIterator != pixelEnd)
{
Expand Down
4 changes: 2 additions & 2 deletions Examples/DataRepresentation/Path/PolyLineParametricPath1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ main(int argc, char * argv[])

// Software Guide : BeginCodeSnippet
const ImageType::ConstPointer image = reader->GetOutput();
auto path = PathType::New();
auto path = PathType::New();

using ContinuousIndexType = PathType::ContinuousIndexType;
ContinuousIndexType cindex;
Expand All @@ -94,7 +94,7 @@ main(int argc, char * argv[])
ImagePointType origin = image->GetOrigin();

ImageType::SpacingType spacing = image->GetSpacing();
ImageType::SizeType size = image->GetBufferedRegion().GetSize();
ImageType::SizeType size = image->GetBufferedRegion().GetSize();

ImagePointType point;

Expand Down
2 changes: 1 addition & 1 deletion Examples/Filtering/AntiAliasBinaryImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ main(int argc, char * argv[])
const char * outputFilename1 = argv[2];
const char * outputFilename2 = argv[3];

double maximumRMSError = 0.01;
double maximumRMSError = 0.01;
unsigned int numberOfIterations = 50;

if (argc > 4)
Expand Down
2 changes: 1 addition & 1 deletion Examples/Filtering/BilateralImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ main(int argc, char * argv[])

// Software Guide : BeginCodeSnippet
constexpr unsigned int Dimension = InputImageType::ImageDimension;
double domainSigmas[Dimension];
double domainSigmas[Dimension];
for (double & domainSigma : domainSigmas)
{
domainSigma = std::stod(argv[3]);
Expand Down
6 changes: 3 additions & 3 deletions Examples/Filtering/CompositeFilterExample.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -137,9 +137,9 @@ class CompositeExampleImageFilter : public ImageToImageFilter<TImage, TImage>
// Software Guide : EndLatex

// Software Guide : BeginCodeSnippet
typename GradientType::Pointer m_GradientFilter;
typename GradientType::Pointer m_GradientFilter;
typename ThresholdType::Pointer m_ThresholdFilter;
typename RescalerType::Pointer m_RescaleFilter;
typename RescalerType::Pointer m_RescaleFilter;

PixelType m_Threshold;
};
Expand Down Expand Up @@ -233,7 +233,7 @@ CompositeExampleImageFilter<TImage>::GenerateData()
template <typename TImage>
void
CompositeExampleImageFilter<TImage>::PrintSelf(std::ostream & os,
Indent indent) const
Indent indent) const
{
Superclass::PrintSelf(os, indent);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ main(int argc, char * argv[])


const unsigned int numberOfIterations = std::stoi(argv[3]);
const double timeStep = std::stod(argv[4]);
const double conductance = std::stod(argv[5]);
const bool useImageSpacing = (argc != 6);
const double timeStep = std::stod(argv[4]);
const double conductance = std::stod(argv[5]);
const bool useImageSpacing = (argc != 6);

// Software Guide : BeginLatex
//
Expand Down
2 changes: 1 addition & 1 deletion Examples/Filtering/CurvatureFlowImageFilter.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ main(int argc, char * argv[])


const unsigned int numberOfIterations = std::stoi(argv[3]);
const double timeStep = std::stod(argv[4]);
const double timeStep = std::stod(argv[4]);


// Software Guide : BeginLatex
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,10 +79,10 @@ main(int argc, char * argv[])
}

constexpr unsigned int Dimension = 3;
unsigned int numberOfImages = 0;
unsigned int numberOfGradientImages = 0;
bool readb0 = false;
double b0 = 0;
unsigned int numberOfImages = 0;
unsigned int numberOfGradientImages = 0;
bool readb0 = false;
double b0 = 0;

using PixelType = unsigned short;
using ImageType = itk::VectorImage<unsigned short, 3>;
Expand Down Expand Up @@ -138,7 +138,7 @@ main(int argc, char * argv[])
img->GetMetaDataDictionary();
std::vector<std::string> imgMetaKeys = imgMetaDictionary.GetKeys();
std::vector<std::string>::const_iterator itKey = imgMetaKeys.begin();
std::string metaString;
std::string metaString;

TensorReconstructionImageFilterType::GradientDirectionType vect3d;
const TensorReconstructionImageFilterType::GradientDirectionContainerType::
Expand Down
6 changes: 3 additions & 3 deletions Examples/Filtering/DigitallyReconstructedRadiograph1.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ main(int argc, char * argv[])

if (verbose)
{
unsigned int i;
unsigned int i;
const InputImageType::SpacingType spacing = image->GetSpacing();
std::cout << std::endl << "Input ";

Expand Down Expand Up @@ -534,14 +534,14 @@ main(int argc, char * argv[])
transform->SetTranslation(translation);
transform->SetRotation(dtr * rx, dtr * ry, dtr * rz);

InputImageType::PointType imOrigin = image->GetOrigin();
InputImageType::PointType imOrigin = image->GetOrigin();
InputImageType::SpacingType imRes = image->GetSpacing();

using InputImageRegionType = InputImageType::RegionType;
using InputImageSizeType = InputImageRegionType::SizeType;

const InputImageRegionType imRegion = image->GetBufferedRegion();
InputImageSizeType imSize = imRegion.GetSize();
InputImageSizeType imSize = imRegion.GetSize();

imOrigin[0] += imRes[0] * static_cast<double>(imSize[0]) / 2.0;
imOrigin[1] += imRes[1] * static_cast<double>(imSize[1]) / 2.0;
Expand Down
Loading
Loading