Commit f830ff47 authored by Kitware Robot's avatar Kitware Robot Committed by David Gobbi

Reindent using the reindentation script.

This commit reindents the code with the following utility:
Utilities/Maintenance/vtk-reindent-code.py

This utility changes the positions of the braces so that they are no
longer indented relative to the code block they reside in.

The bash command line used was the following:

for d in Charts Common Deprecated Domains Examples Filters GUISupport \
         Geovis IO Imaging Infovis Interaction Parallel Rendering \
         Testing Views Web Wrapping; do
  for e in cxx cxx.in txx txx.in hxx hxx.in h h.in c c.in; do
    find "${d}" -name "*.${e}" -exec \
      python Utilities/Maintenance/vtk_reindent_code.py {} +
  done
done
parent 6a7e5148
Pipeline #27723 passed with stage

Too many changes to show.

To preserve performance only 1000 of 1000+ files are displayed.

......@@ -68,7 +68,7 @@ int TestAreaPlot( int, char * [] )
float inc = 7.5 / (numPoints-1);
table->SetNumberOfRows(numPoints);
for (int i = 0; i < numPoints; ++i)
{
{
table->SetValue(i, 0, i * inc + 0.01);
table->SetValue(i, 1, cos(i * inc) + 0.01);
table->SetValue(i, 2, sin(i * inc) + 0.01);
......@@ -77,7 +77,7 @@ int TestAreaPlot( int, char * [] )
table->SetValue(i, 5, 1.0);
validMask->SetValue(i, (i > 30 && i < 40) ? 0 : 1);
}
}
// Add multiple line plots, setting the colors etc
vtkPlotArea* area = vtkPlotArea::SafeDownCast(chart->AddPlot(vtkChart::AREA));
......
......@@ -50,7 +50,7 @@ int TestAxes(int , char * [])
std::vector<vtkSmartPointer<vtkAxis> > axesVertical(4);
for (size_t i = 0; i < axesVertical.size(); ++i)
{
{
axesVertical[i] = vtkSmartPointer<vtkAxis>::New();
vtkAxis *axis = axesVertical[i].GetPointer();
axis->SetPoint1(vtkVector2f(i * 69 + 30, 10));
......@@ -60,7 +60,7 @@ int TestAxes(int , char * [])
axis->SetRange(-1, 50);
view->GetScene()->AddItem(axis);
}
}
// Exercise some of the API in the axis API.
axesVertical[0]->AutoScale();
......@@ -85,15 +85,15 @@ int TestAxes(int , char * [])
axesVertical[3]->AutoScale();
for (size_t i = 0; i < axesVertical.size(); ++i)
{
{
axesVertical[i]->Update();
}
}
// Let's create a few axes, and place them on the scene.
std::vector<vtkSmartPointer<vtkAxis> > axesHorizontal(6);
for (size_t i = 0; i < axesHorizontal.size(); ++i)
{
{
axesHorizontal[i] = vtkSmartPointer<vtkAxis>::New();
vtkAxis *axis = axesHorizontal[i].GetPointer();
axis->SetPoint1(vtkVector2f(310, i * 50 + 30));
......@@ -103,7 +103,7 @@ int TestAxes(int , char * [])
view->GetScene()->AddItem(axis);
axis->Update();
}
}
// Now to test some of the API in the horizontal axes.
axesHorizontal[0]->LogScaleOn(); // LogScaleActive=false because min*max<0
......@@ -112,10 +112,10 @@ int TestAxes(int , char * [])
axesHorizontal[0]->GetRange(range);
if (!axesHorizontal[0]->GetLogScaleActive() ||
fabs(range[0]) > 1e-8 || fabs(range[1] - 2.) > 1e-8)
{
{
cerr << "ERROR: did not transition to log scaling when range changed.\n";
status = EXIT_FAILURE;
}
}
// Now change the axis limits in log-space...
axesHorizontal[0]->SetMinimumLimit(-1.);
axesHorizontal[0]->SetMaximumLimit(3.);
......@@ -123,19 +123,19 @@ int TestAxes(int , char * [])
if (
fabs(axesHorizontal[0]->GetUnscaledMinimumLimit()-0.1) > 1e-8 ||
fabs(axesHorizontal[0]->GetUnscaledMaximumLimit()-1000.0) > 1e-8)
{
{
cerr
<< "ERROR: did not update unscaled limits when scaled limits changed.\n";
status = EXIT_FAILURE;
}
}
axesHorizontal[0]->LogScaleOff();
if (axesHorizontal[0]->GetLogScaleActive() ||
-axesHorizontal[0]->GetMinimumLimit() ==
axesHorizontal[0]->GetMaximumLimit())
{
{
cerr << "ERROR: did not transition from log scaling or reset limits.\n";
status = EXIT_FAILURE;
}
}
axesHorizontal[0]->AutoScale();
axesHorizontal[0]->SetRange(20, 60); // restore range so rest of test can proceed
......@@ -158,9 +158,9 @@ int TestAxes(int , char * [])
axesHorizontal[5]->SetPosition(vtkAxis::BOTTOM);
for (size_t i = 0; i < axesHorizontal.size(); ++i)
{
{
axesHorizontal[i]->Update();
}
}
// Test LogScale and UnscaledRange methods
vtkNew<vtkAxis> logAxis;
......@@ -172,29 +172,29 @@ int TestAxes(int , char * [])
logAxis->GetUnscaledRange(NULL); // Insure NULL pointers are ignored.
logAxis->GetUnscaledRange(logRange);
if ((logRange[0] != plainRange[0]) || (logRange[1] != plainRange[1]))
{
{
vtkGenericWarningMacro(
<< "Error: expected unscaled range to be unchanged but got ["
<< logRange[0] << ", " << logRange[1] << "].");
}
}
logAxis->GetRange(logRange);
if (
(fabs((pow(10., logRange[0]) - plainRange[0])) > 1e-6) ||
(fabs((pow(10., logRange[1]) - plainRange[1])) > 1e-6))
{
{
vtkGenericWarningMacro(
<< "Error: expected scaled range to be [-1, 3] but got ["
<< logRange[0] << ", " << logRange[1] << "].");
}
}
if (
(logAxis->GetMinimum() != logRange[0]) ||
(logAxis->GetMaximum() != logRange[1]) ||
(logAxis->GetUnscaledMinimum() != plainRange[0]) ||
(logAxis->GetUnscaledMaximum() != plainRange[1]))
{
{
vtkGenericWarningMacro(
"Error: returned ranges do not match returned min/max.");
}
}
logAxis->SetMinimum(logRange[0]);
logAxis->SetMaximum(logRange[1]);
logAxis->Update();
......
......@@ -80,16 +80,16 @@ int TestBagPlot(int, char * [])
// Fill the table
for (int j = 0; j < numDataJ; ++j)
{
{
for (int i = 0; i < numDataI; ++i)
{
{
table->SetValue(i + j * numDataI, 0, i); //X
table->SetValue(i + j * numDataI, 1, j); //Y
double d = densities[i + j * numDataI];
table->SetValue(i + j * numDataI, 2, d); // Density
}
cout << endl;
}
cout << endl;
}
vtkNew<vtkPlotBag> bagPlot;
chart->AddPlot(bagPlot.GetPointer());
......
......@@ -65,12 +65,12 @@ int TestBarGraph(int , char * [])
table->SetNumberOfRows(12);
for (int i = 0; i < 12; i++)
{
{
table->SetValue(i,0,i+1);
table->SetValue(i,1,data_2008[i]);
table->SetValue(i,2,data_2009[i]);
table->SetValue(i,3,data_2010[i]);
}
}
// Add multiple bar plots, setting the colors etc
vtkPlot *plot = 0;
......
......@@ -64,12 +64,12 @@ int TestBarGraphHorizontal(int , char * [])
table->SetNumberOfRows(12);
for (int i = 0; i < 12; i++)
{
{
table->SetValue(i,0,i+1);
table->SetValue(i,1,data_2008[i]);
table->SetValue(i,2,data_2009[i]);
table->SetValue(i,3,data_2010[i]);
}
}
// Add multiple bar plots, setting the colors etc
vtkPlot *plot = 0;
......
......@@ -66,12 +66,12 @@ int TestBarGraphSelection(int , char * [])
table->SetNumberOfRows(12);
for (int i = 0; i < 12; i++)
{
{
table->SetValue(i,0,i+1);
table->SetValue(i,1,data_2008[i]);
table->SetValue(i,2,data_2009[i]);
table->SetValue(i,3,data_2010[i]);
}
}
// Build a selection object.
vtkNew<vtkIdTypeArray> selection;
......
......@@ -45,26 +45,26 @@ int TestBoxPlot(int , char* [])
vtkNew<vtkTable> inputBoxPlotTable;
for (int i = 0; i < numParam; i++)
{
{
char num[10];
sprintf(num, "P%d", i);
vtkNew<vtkIntArray> arrIndex;
arrIndex->SetName(num);
inputBoxPlotTable->AddColumn(arrIndex.GetPointer());
}
}
inputBoxPlotTable->SetNumberOfRows(5);
// This scaling parameter can be used to test Y axis positioning
const double scale = 1e02;
for (int i = 0; i < numParam; i++)
{
{
inputBoxPlotTable->SetValue(0, i, (i/2) * scale); //Q0
inputBoxPlotTable->SetValue(1, i, (2*i + 2 - i) * scale); //Q1
inputBoxPlotTable->SetValue(2, i, (2*i + 4) * scale); //Q2
inputBoxPlotTable->SetValue(3, i, (2*i + 7) * scale); //Q3
inputBoxPlotTable->SetValue(4, i, (2*i + 8) * scale); //Q4