Commit 4520ecda authored by Sebastien Jourdain's avatar Sebastien Jourdain
Browse files

Fix cast issue / static method / ignore warning

Change-Id: If71380dc6f45a4c9976130e58711a9f5e7820ec2
parent 642ccd3d
......@@ -10,7 +10,8 @@ set (CTEST_CUSTOM_WARNING_EXCEPTION
#ignore protobuf related warnings.
"ThirdParty.protobuf/"
"google.protobuf"
"vtkPVMessage.pb.h"
"vtkPVMessage.pb"
"vtkSMMessage"
"google::protobuf::Message"
#ignore warnings coming from QT headers.
......
......@@ -188,14 +188,12 @@ int vtkPythonProgrammableFilter::RequestInformation(
// Setup ExtentTranslator so that all downstream piece requests are
// converted to whole extent update requests, as need by the histogram filter.
vtkStreamingDemandDrivenPipeline* sddp =
vtkStreamingDemandDrivenPipeline::SafeDownCast(this->GetExecutive());
if (strcmp(
sddp->GetExtentTranslator(outInfo)->GetClassName(),
vtkStreamingDemandDrivenPipeline::GetExtentTranslator(outInfo)->GetClassName(),
"vtkOnePieceExtentTranslator") != 0)
{
vtkExtentTranslator* et = vtkOnePieceExtentTranslator::New();
sddp->SetExtentTranslator(outInfo, et);
vtkStreamingDemandDrivenPipeline::SetExtentTranslator(outInfo, et);
et->Delete();
}
......
......@@ -1488,8 +1488,7 @@ bool vtkPVSynchronizedRenderWindows::BroadcastToDataServer(vtkSelection* selecti
return true;
}
vtkProcessModule* pm = vtkProcessModule::GetProcessModule();
if (pm->GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
if (vtkProcessModule::GetProcessType() == vtkProcessModule::PROCESS_RENDER_SERVER)
{
return false;
}
......
......@@ -687,7 +687,7 @@ void vtkPVXMLElement::CopyTo(vtkPVXMLElement* other)
other->Internal->AttributeNames = this->Internal->AttributeNames;
other->Internal->AttributeValues = this->Internal->AttributeValues;
other->AddCharacterData(this->Internal->CharacterData.c_str(),
this->Internal->CharacterData.size());
static_cast<int>(this->Internal->CharacterData.size()));
// Copy recursivly
vtkPVXMLElementInternals::VectorOfElements::iterator iter;
......@@ -709,7 +709,7 @@ void vtkPVXMLElement::CopyAttributesTo(vtkPVXMLElement* other)
other->Internal->AttributeNames = this->Internal->AttributeNames;
other->Internal->AttributeValues = this->Internal->AttributeValues;
other->AddCharacterData(this->Internal->CharacterData.c_str(),
this->Internal->CharacterData.size());
static_cast<int>(this->Internal->CharacterData.size()));
}
//----------------------------------------------------------------------------
......
......@@ -2079,7 +2079,7 @@ void vtkSMProxy::LoadState( const vtkSMMessage* message,
// Make sure all dependent domains are updated. UpdateInformation()
// might have produced new information that invalidates the domains.
for (int i=0, nb=touchedProperties.size(); i < nb; i++)
for (int i=0, nb=static_cast<int>(touchedProperties.size()); i < nb; i++)
{
touchedProperties[i]->UpdateDependentDomains();
}
......
......@@ -136,7 +136,7 @@ vtkTypeUInt32 vtkSMSourceProxy::GetGlobalID()
//---------------------------------------------------------------------------
unsigned int vtkSMSourceProxy::GetNumberOfOutputPorts()
{
return this->PInternals->OutputPorts.size();
return static_cast<int>(this->PInternals->OutputPorts.size());
}
//---------------------------------------------------------------------------
......
......@@ -102,7 +102,7 @@ struct Controller
bool RemoveRMICallback(unsigned long observerTagId)
{
int size = this->RMICallbackIdMapping[observerTagId].size();
int size = static_cast<int>(this->RMICallbackIdMapping[observerTagId].size());
bool result = false;
for(int i=0;i<size;i++)
{
......@@ -307,7 +307,7 @@ public:
//-----------------------------------------------------------------
int GetNumberOfRegisteredControllers()
{
return this->Controllers.size();
return static_cast<int>(this->Controllers.size());
}
//-----------------------------------------------------------------
vtkCommunicator* GetActiveCommunicator()
......@@ -390,7 +390,7 @@ public:
//-----------------------------------------------------------------
int GetNumberOfControllers()
{
return this->Controllers.size();
return static_cast<int>(this->Controllers.size());
}
//-----------------------------------------------------------------
int GetControllerId(int idx)
......
......@@ -84,7 +84,7 @@ void vtkPVKeyFrame::SetNumberOfKeyValues(unsigned int num)
//----------------------------------------------------------------------------
unsigned int vtkPVKeyFrame::GetNumberOfKeyValues()
{
return this->Internals->KeyValues.size();
return static_cast<unsigned int>(this->Internals->KeyValues.size());
}
//----------------------------------------------------------------------------
......
......@@ -140,7 +140,7 @@ void vtkPVKeyFrameCueManipulator::RemoveAllKeyFrames()
//----------------------------------------------------------------------------
unsigned int vtkPVKeyFrameCueManipulator::GetNumberOfKeyFrames()
{
return this->Internals->KeyFrames.size();
return static_cast<unsigned int>(this->Internals->KeyFrames.size());
}
//----------------------------------------------------------------------------
......
......@@ -706,7 +706,7 @@ int vtkSpyPlotReader::RequestData(
origin, extents,
realExtents,
realDims);
for(int i=blocksPerLevel.size(); i<=level; i++)
for(int i=static_cast<int>(blocksPerLevel.size()); i<=level; i++)
{
blocksPerLevel.push_back(0);
}
......@@ -2280,7 +2280,7 @@ void vtkSpyPlotReader::SetGlobalLevels(vtkCompositeDataSet *composite)
for(unsigned int level = 0; level<numberOfLevels; level++)
{
int globalIndex = globalIndices[level];
int numberOfDataSets = datasets[level].size();
int numberOfDataSets = static_cast<int>(datasets[level].size());
// put the datasets back starting at globalIndex.
// All other indices are in their initialized state.
for (int kk=0; kk < numberOfDataSets; kk++)
......
......@@ -112,7 +112,7 @@ MD5::MD5()
MD5::MD5(const std::string &text)
{
init();
update(text.c_str(), text.length());
update(text.c_str(), static_cast<size_type>(text.length()));
finalize();
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment