Commit 3020e4e5 authored by Ben Boeckel's avatar Ben Boeckel
Browse files

clang-format: sweep the entire repository

parent 2af04e90
......@@ -26,7 +26,10 @@ class VTK_EXPORT vtkCPImplementedTestDriver : public vtkCPTestDriver
public:
static vtkCPImplementedTestDriver* New();
vtkTypeMacro(vtkCPImplementedTestDriver, vtkCPTestDriver);
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE { this->Superclass::PrintSelf(os, indent); }
void PrintSelf(ostream& os, vtkIndent indent) VTK_OVERRIDE
{
this->Superclass::PrintSelf(os, indent);
}
protected:
vtkCPImplementedTestDriver()
......
......@@ -44,7 +44,8 @@ public:
* that were returned were already built before.
* vtkCustomUnstructuredGridBuilder will also delete the grid.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
/**
* Customized function to build UnstructuredGrid.
......
......@@ -39,7 +39,8 @@ public:
* that were returned were already built before.
* vtkCPFileGridBuilder will also delete the grid.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
//@{
/**
......
......@@ -39,7 +39,8 @@ public:
* that were returned were already built before.
* vtkCPGridBuilder will also delete the grid.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE = 0;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE = 0;
//@{
/**
......
......@@ -41,7 +41,8 @@ public:
* Return a grid. BuiltNewGrid is 0 if the grid is the same
* as the last time step.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
/**
* Get the Grid.
......
......@@ -40,7 +40,8 @@ public:
* that were returned were already built before.
* vtkCPUniformGridBuilder will also delete the grid.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
//@{
/**
......
......@@ -43,7 +43,8 @@ public:
* that were returned were already built before.
* vtkCPUnstructuredGridBuilder will also delete the grid.
*/
virtual vtkDataObject* GetGrid(unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
virtual vtkDataObject* GetGrid(
unsigned long timeStep, double time, int& builtNewGrid) VTK_OVERRIDE;
/**
* Get the UnstructuredGrid.
......
......@@ -166,7 +166,7 @@ myMainWindow::myMainWindow()
new pqAlwaysConnectedBehavior(this);
new pqAutoLoadPluginXMLBehavior(this);
pqApplyBehavior* applyBehavior = new pqApplyBehavior(this);
// Register panels
foreach (pqPropertiesPanel* ppanel, this->findChildren<pqPropertiesPanel*>())
{
......
......@@ -267,7 +267,7 @@ bool vtkLagrangianIntegrationModelExample::CheckFreeFlightTermination(
//----------------------------------------------------------------------------
bool vtkLagrangianIntegrationModelExample::InteractWithSurface(int vtkNotUsed(surfaceType),
vtkLagrangianParticle* particle, vtkDataSet* surface, vtkIdType cellId,
vtkLagrangianParticle* particle, vtkDataSet* surface, vtkIdType cellId,
std::queue<vtkLagrangianParticle*>& vtkNotUsed(particles))
{
// Surface Interaction example, depending of the variable diameter of the
......
......@@ -56,7 +56,7 @@ public:
* from seed data
*/
virtual void InitializeParticle(vtkLagrangianParticle* particle);
/**
* This method is called when initializing output point data
* It should be inherited when there is some variables data needed to be put
......@@ -107,7 +107,7 @@ protected:
* velocity,
* create new particle...
*/
virtual bool InteractWithSurface(int surfaceType, vtkLagrangianParticle* particle,
virtual bool InteractWithSurface(int surfaceType, vtkLagrangianParticle* particle,
vtkDataSet* surface, vtkIdType cellId, std::queue<vtkLagrangianParticle*>& particles);
/**
......
......@@ -35,7 +35,8 @@ public:
* currenttime is normalized to the time range between
* this key frame and the next key frame.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cueProxy, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cueProxy, vtkPVKeyFrame* next) VTK_OVERRIDE;
protected:
vtkPVBooleanKeyFrame();
......
......@@ -43,7 +43,8 @@ public:
* this method is called to allow the key frame to use vtkCameraInterpolator2
* to do path-based interpolations for the camera.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
// Overridden, since these methods are not supported by this class.
virtual void SetKeyValue(unsigned int, double) VTK_OVERRIDE {}
......
......@@ -96,7 +96,8 @@ public:
* currenttime is normalized to the time range between
* this key frame and the next key frame.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
protected:
vtkPVCompositeKeyFrame();
......
......@@ -35,7 +35,8 @@ public:
* currenttime is normalized to the time range between
* this key frame and the next key frame.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
//@{
/**
......
......@@ -35,7 +35,8 @@ public:
* currenttime is normalized to the time range between
* this key frame and the next key frame.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
protected:
vtkPVRampKeyFrame();
......
......@@ -40,7 +40,8 @@ public:
* currenttime is normalized to the time range between
* this key frame and the next key frame.
*/
virtual void UpdateValue(double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
virtual void UpdateValue(
double currenttime, vtkPVAnimationCue* cue, vtkPVKeyFrame* next) VTK_OVERRIDE;
//@{
/**
......
......@@ -124,10 +124,12 @@ public:
this->Initialized = true;
vtkPythonInterpreter::Initialize();
vtkPythonScopeGilEnsurer gilEnsurer;
this->CinemaReaderModule.TakeReference(PyImport_ImportModule("cinema_python.adaptors.paraview.cinemareader"));
this->CinemaReaderModule.TakeReference(
PyImport_ImportModule("cinema_python.adaptors.paraview.cinemareader"));
if (!this->CinemaReaderModule)
{
vtkGenericWarningMacro("Failed to import 'cinema_python.adaptors.paraview.cinemareader' module.");
vtkGenericWarningMacro(
"Failed to import 'cinema_python.adaptors.paraview.cinemareader' module.");
if (PyErr_Occurred())
{
PyErr_Print();
......@@ -158,12 +160,11 @@ public:
{
if (PyErr_ExceptionMatches(PyExc_RuntimeError))
{
vtkGenericWarningMacro(
"This Cinema store is not supported. "
"Only 'composite-image-stack' aka Spec-C file stores "
"with 'azimuth-elevation-roll' aka inward facing pose cameras "
"are supported.")
}
vtkGenericWarningMacro("This Cinema store is not supported. "
"Only 'composite-image-stack' aka Spec-C file stores "
"with 'azimuth-elevation-roll' aka inward facing pose cameras "
"are supported.")
}
else
{
vtkGenericWarningMacro("Failed to instantiate a 'FileStore'.");
......
......@@ -152,7 +152,7 @@ public:
continue;
}
if (ttype == VALUES)
{
{
if (mapper->GetScalarVisibility() && (lut != NULL))
{
double prev = lut->GetAlpha();
......
......@@ -27,7 +27,7 @@
#include "vtkSMObject.h"
#include "vtkPVCinemaReaderModule.h" // for export macros
#include <string> // needed for std::string
#include <string> // needed for std::string
class vtkPVCinemaDatabaseInformation;
class vtkSMSelfGeneratingSourceProxy;
......
......@@ -46,7 +46,8 @@ protected:
vtkPConvertSelection();
~vtkPConvertSelection();
virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int RequestData(
vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
vtkMultiProcessController* Controller;
......
......@@ -802,8 +802,8 @@ void vtkPVDataInformation::AddInformation(vtkPVInformation* pvi, int addingParts
return;
}
if (this->NumberOfPoints == 0 && this->NumberOfCells == 0 &&
this->NumberOfDataSets == 0 && this->FieldDataInformation->GetNumberOfArrays() == 0)
if (this->NumberOfPoints == 0 && this->NumberOfCells == 0 && this->NumberOfDataSets == 0 &&
this->FieldDataInformation->GetNumberOfArrays() == 0)
{
// Just copy the other array information.
this->DeepCopy(info, !addingParts);
......@@ -821,8 +821,7 @@ void vtkPVDataInformation::AddInformation(vtkPVInformation* pvi, int addingParts
this->DataSetType = info->GetDataSetType();
this->SetDataClassName(info->GetDataClassName());
}
else if (this->DataSetType == VTK_IMAGE_DATA ||
this->DataSetType == VTK_RECTILINEAR_GRID ||
else if (this->DataSetType == VTK_IMAGE_DATA || this->DataSetType == VTK_RECTILINEAR_GRID ||
this->DataSetType == VTK_DATA_SET || info->GetDataSetType() == VTK_IMAGE_DATA ||
info->GetDataSetType() == VTK_RECTILINEAR_GRID || info->GetDataSetType() == VTK_DATA_SET)
{
......
......@@ -77,7 +77,8 @@ protected:
vtkInformationVector* outputVector) VTK_OVERRIDE;
// runs the algorithm and fills the output with results
virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int RequestData(
vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int FillOutputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
......
......@@ -58,7 +58,8 @@ bool vtkPVFileInformationHelper::GetActiveFileIsReadable()
//-----------------------------------------------------------------------------
bool vtkPVFileInformationHelper::GetActiveFileIsDirectory()
{
return vtksys::SystemTools::FileIsDirectory(vtkPVFileInformationHelper::Utf8ToLocalWin32(this->Path));
return vtksys::SystemTools::FileIsDirectory(
vtkPVFileInformationHelper::Utf8ToLocalWin32(this->Path));
}
//-----------------------------------------------------------------------------
......@@ -102,7 +103,7 @@ std::string vtkPVFileInformationHelper::LocalToUtf8Win32(const std::string& path
int wlen = static_cast<int>(path.length()) * 2 + 1;
WCHAR* wpath = new WCHAR[wlen];
char* lpath = new char[wlen];
// We may want a stronger implementation ,
// We may want a stronger implementation ,
// see vtksys::Encoding way of recovering converted string size
// TODO
int err = MultiByteToWideChar(CP_ACP, 0, path.c_str(), -1, wpath, wlen);
......
......@@ -282,8 +282,8 @@ void vtkPVOptions::Initialize()
// out. The options are actually only available when built against a suitable
// mesa and ParaView is told that they exist. They are parsed in the forward
// executable infrastructure.
this->AddBooleanArgument("--native", 0, &this->DummyMesaFlag,
"Use the system-provided OpenGL implementation.");
this->AddBooleanArgument(
"--native", 0, &this->DummyMesaFlag, "Use the system-provided OpenGL implementation.");
this->AddBooleanArgument("--mesa", 0, &this->DummyMesaFlag,
"Use the provided Mesa build and its default rendering "
"backend.");
......@@ -291,8 +291,8 @@ void vtkPVOptions::Initialize()
"Use the provided Mesa build and the software renderer "
"(softpipe).");
#if defined(PARAVIEW_WITH_SUPERBUILD_MESA_SWR)
this->AddBooleanArgument("--mesa-swr", 0, &this->DummyMesaFlag,
"Use the provided Mesa build and the SWR renderer.");
this->AddBooleanArgument(
"--mesa-swr", 0, &this->DummyMesaFlag, "Use the provided Mesa build and the SWR renderer.");
#endif
#endif
}
......
......@@ -71,14 +71,16 @@ public:
/**
* State file to load on startup.
*/
vtkGetStringMacro(StateFileName); // Bug #5711
//@}
// See Bug #5711
vtkGetStringMacro(StateFileName);
//@}
//@{
/**
* Servers file to load on startup.
*/
vtkGetStringMacro(ServersFileName);
//@}
//@}
//@{
/**
......
......@@ -130,7 +130,7 @@ std::string getModuleAttrAsString(const char* module, const char* attribute)
#else
const char* cdata = PyBytes_AsString(attr);
#endif
std::string result(cdata? cdata : "");
std::string result(cdata ? cdata : "");
return result;
}
......
......@@ -51,7 +51,8 @@ protected:
virtual int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
virtual int RequestDataObject(vtkInformation* request, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_OVERRIDE;
virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int RequestData(
vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
/**
* Method used to initialize the output data object in request data.
......
......@@ -163,8 +163,8 @@ protected:
* code so we override this method to store request for later use
* since otherwise we won't have access to it.
*/
virtual int ProcessRequest(
vtkInformation* request, vtkInformationVector** inInfo, vtkInformationVector* outInfo) VTK_OVERRIDE;
virtual int ProcessRequest(vtkInformation* request, vtkInformationVector** inInfo,
vtkInformationVector* outInfo) VTK_OVERRIDE;
char* Script;
char* InformationScript;
......
......@@ -54,7 +54,7 @@ vtkSmartPointer<vtkPolyData> GetPolyData(const char** parrays = NULL, const char
return pd;
}
int TestPartialArraysInformation(int, char*[])
int TestPartialArraysInformation(int, char* [])
{
vtkNew<vtkMultiBlockDataSet> data;
......
......@@ -423,7 +423,7 @@ void vtkPVFileInformation::CopyFromObject(vtkObject* object)
std::string path = helper->GetPath();
std::string lpath = vtkPVFileInformationHelper::Utf8ToLocalWin32(path);
this->SetName(path.c_str());
if (!vtksys::SystemTools::FileIsFullPath(path))
{
lpath = MakeAbsolutePath(lpath, lworking_directory);
......@@ -449,7 +449,7 @@ void vtkPVFileInformation::CopyFromObject(vtkObject* object)
this->SetFullPath(vtkPVFileInformationHelper::LocalToUtf8Win32(lpath).c_str());
this->Type = vtkPVFileInformationGetType(lpath.c_str());//this->FullPath);
this->Type = vtkPVFileInformationGetType(lpath.c_str()); // this->FullPath);
if (isLink && this->Type == SINGLE_FILE)
{
this->Type = SINGLE_FILE_LINK;
......@@ -664,8 +664,7 @@ void vtkPVFileInformation::GetWindowsDirectoryListing()
{
vtkPVFileInformation* info = vtkPVFileInformation::New();
info->SetName(vtkPVFileInformationHelper::LocalToUtf8Win32(shares[i]).c_str());
std::string fullpath =
vtksys::SystemTools::CollapseFullPath(shares[i].c_str(), lfullPath);
std::string fullpath = vtksys::SystemTools::CollapseFullPath(shares[i].c_str(), lfullPath);
info->SetFullPath(vtkPVFileInformationHelper::LocalToUtf8Win32(fullpath).c_str());
info->Type = type;
info->FastFileTypeDetection = this->FastFileTypeDetection;
......@@ -950,8 +949,9 @@ void vtkPVFileInformation::SetHiddenFlag()
this->Hidden = false;
return;
}
//LPCSTR fp = this->FullPath;
DWORD flags = GetFileAttributes(vtkPVFileInformationHelper::Utf8ToLocalWin32(this->FullPath).c_str());
// LPCSTR fp = this->FullPath;
DWORD flags =
GetFileAttributes(vtkPVFileInformationHelper::Utf8ToLocalWin32(this->FullPath).c_str());
this->Hidden = (flags & FILE_ATTRIBUTE_HIDDEN) ? true : false;
#else
if (!this->Name)
......
......@@ -42,21 +42,22 @@ std::string vtkPVMacFileInformationHelper::GetHomeDirectory()
}
//-----------------------------------------------------------------------------
std::vector< vtkPVMacFileInformationHelper::NamePath > vtkPVMacFileInformationHelper::GetMountedVolumes()
std::vector<vtkPVMacFileInformationHelper::NamePath>
vtkPVMacFileInformationHelper::GetMountedVolumes()
{
std::vector< vtkPVMacFileInformationHelper::NamePath > volumes;
NSArray *urls = [[NSFileManager defaultManager]
mountedVolumeURLsIncludingResourceValuesForKeys:@[NSURLVolumeNameKey]
options:0];
for (NSURL *url in urls)
{
std::vector<vtkPVMacFileInformationHelper::NamePath> volumes;
NSArray* urls = [[NSFileManager defaultManager]
mountedVolumeURLsIncludingResourceValuesForKeys:@[ NSURLVolumeNameKey ]
options:0];
for (NSURL* url in urls)
{
NSString* path = [url path];
std::string pathStr([path UTF8String]);
NSString *name = nil;
NSString* name = nil;
[url getResourceValue:&name forKey:NSURLLocalizedNameKey error:NULL];
std::string nameStr([name UTF8String]);
volumes.push_back(std::make_pair(nameStr, pathStr));
}
}
return volumes;
}
......@@ -72,31 +73,29 @@ std::string vtkPVMacFileInformationHelper::GetBundleDirectory()
}
//-----------------------------------------------------------------------------
namespace {
namespace
{
std::string GetUserDomainDirectory(NSSearchPathDirectory userDirectory)
{
std::string directory;
NSArray* urls = [[NSFileManager defaultManager]
URLsForDirectory:userDirectory
inDomains:NSUserDomainMask];
for (NSURL *url in urls)
{
NSArray* urls =
[[NSFileManager defaultManager] URLsForDirectory:userDirectory inDomains:NSUserDomainMask];
for (NSURL* url in urls)
{
NSString* path = [url path];
// Double check that directory exists
BOOL isDirectory = false;
BOOL exists = [[NSFileManager defaultManager]
fileExistsAtPath:path
isDirectory:&isDirectory];
BOOL exists = [[NSFileManager defaultManager] fileExistsAtPath:path isDirectory:&isDirectory];
if (exists && isDirectory)
{
directory = [path UTF8String];\
{
directory = [path UTF8String];
// There should be at most one such user directory, so exit early
break;
}
}
}
return directory;
}
......
......@@ -48,9 +48,10 @@ public:
protected : vtkSliceAlongPolyPlane();
virtual ~vtkSliceAlongPolyPlane();
virtual int RequestDataObject(
vtkInformation*, vtkInformationVector** inputVector, vtkInformationVector* outputVector) VTK_OVERRIDE;
virtual int RequestData(vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int RequestDataObject(vtkInformation*, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_OVERRIDE;
virtual int RequestData(
vtkInformation*, vtkInformationVector**, vtkInformationVector*) VTK_OVERRIDE;
virtual int FillInputPortInformation(int port, vtkInformation* info) VTK_OVERRIDE;
/**
......
......@@ -46,8 +46,8 @@ public:
/**
* Overridden to handle various view passes.
*/
virtual int ProcessViewRequest(
vtkInformationRequestKey* request_type, vtkInformation* inInfo, vtkInformation* outInfo) VTK_OVERRIDE;
virtual int ProcessViewRequest(vtkInformationRequestKey* request_type, vtkInformation* inInfo,
vtkInformation* outInfo) VTK_OVERRIDE;
/**
* Get/Set the visibility for this representation. When the visibility of
......@@ -83,8 +83,8 @@ protected:
* should check if streaming is enabled i.e. vtkPVView::GetEnableStreaming()
* and the input pipeline provides necessary AMR meta-data.
*/
virtual int RequestInformation(
vtkInformation* rqst, vtkInformationVector** inputVector, vtkInformationVector* outputVector) VTK_OVERRIDE;
virtual int RequestInformation(vtkInformation* rqst, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_OVERRIDE;
/**
* Setup the block request. During StreamingUpdate, this will request the
......@@ -101,8 +101,8 @@ protected:
* When not in StreamingUpdate, this also initializes the priority queue since
* the input AMR may have totally changed, including its structure.
*/
virtual int RequestData(
vtkInformation* rqst, vtkInformationVector** inputVector, vtkInformationVector* outputVector) VTK_OVERRIDE;
virtual int RequestData(vtkInformation* rqst, vtkInformationVector** inputVector,
vtkInformationVector* outputVector) VTK_OVERRIDE;
//@{
/**
......
......@@ -73,8 +73,8 @@ public:
* PrepareForRendering.
* Overridden to skip processing when visibility if off.
*/
virtual int ProcessViewRequest(