Commit fba8d541 authored by David E. DeMarle's avatar David E. DeMarle

Merge branch 'fix-shadowing-warnings' into 'master'

Fix shadowing warnings

See merge request !54
parents 4846505c f45f2d7a
......@@ -321,7 +321,7 @@ XdmfCurvilinearGrid::read()
// Copy stucture from read grid to this grid
copyGrid(grid);
}
else if (shared_ptr<XdmfGrid> grid = shared_dynamic_cast<XdmfGrid>(mGridController->read()))
else if (shared_dynamic_cast<XdmfGrid>(mGridController->read()))
{
XdmfError::message(XdmfError::FATAL, "Error: Grid Type Mismatch");
}
......
......@@ -115,25 +115,25 @@ XdmfDomain::populateItem(const std::map<std::string, std::string> & itemProperti
shared_dynamic_cast<XdmfGridCollection>(*iter)) {
this->insert(gridCollection);
}
else if(shared_ptr<XdmfCurvilinearGrid> grid =
else if(shared_ptr<XdmfCurvilinearGrid> curvilinear_grid =
shared_dynamic_cast<XdmfCurvilinearGrid>(*iter)) {
this->insert(grid);
this->insert(curvilinear_grid);
}
else if(shared_ptr<XdmfGraph> graph =
shared_dynamic_cast<XdmfGraph>(*iter)) {
this->insert(graph);
}
else if(shared_ptr<XdmfRectilinearGrid> grid =
else if(shared_ptr<XdmfRectilinearGrid> rect_grid =
shared_dynamic_cast<XdmfRectilinearGrid>(*iter)) {
this->insert(grid);
this->insert(rect_grid);
}
else if(shared_ptr<XdmfRegularGrid> grid =
else if(shared_ptr<XdmfRegularGrid> regular_grid =
shared_dynamic_cast<XdmfRegularGrid>(*iter)) {
this->insert(grid);
this->insert(regular_grid);
}
else if(shared_ptr<XdmfUnstructuredGrid> grid =
else if(shared_ptr<XdmfUnstructuredGrid> unstructured_grid =
shared_dynamic_cast<XdmfUnstructuredGrid>(*iter)) {
this->insert(grid);
this->insert(unstructured_grid);
}
}
}
......
......@@ -261,7 +261,7 @@ XdmfGridCollection::read()
this->insert(grid->getMap(i));
}
}
else if (shared_ptr<XdmfGrid> grid = shared_dynamic_cast<XdmfGrid>(mGridController->read()))
else if (shared_dynamic_cast<XdmfGrid>(mGridController->read()))
{
XdmfError::message(XdmfError::FATAL, "Error: Grid Type Mismatch");
}
......
......@@ -159,7 +159,7 @@ XdmfGridControllerRead(XDMFGRIDCONTROLLER * controller)
{
XdmfGridController referenceController = *(XdmfGridController *)(controller);
shared_ptr<XdmfGrid> returnGrid = referenceController.read();
XDMFGRID * returnPointer;
XDMFGRID * returnPointer = NULL;
if (shared_ptr<XdmfCurvilinearGrid> curvilinearGrid =
shared_dynamic_cast<XdmfCurvilinearGrid>(returnGrid))
{
......
......@@ -213,7 +213,7 @@ XdmfGridTemplate::getNumberGridCollections() const
}
void
XdmfGridTemplate::insert(const shared_ptr<XdmfGridCollection> GridCollection)
XdmfGridTemplate::insert(const shared_ptr<XdmfGridCollection> /*GridCollection*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Attempting to use insert to add an XdmfGridCollection to an XdmfGridTemplate. "
"Use addStep instead of insert to add to an XdmfGridTemplate");
......@@ -236,7 +236,7 @@ XdmfGridTemplate::removeGridCollection(const unsigned int index)
}
void
XdmfGridTemplate::removeGridCollection(const std::string & Name)
XdmfGridTemplate::removeGridCollection(const std::string & /*Name*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Removing Grids by name from XdmfGridTemplate is not supported");
}
......@@ -345,7 +345,7 @@ XdmfGridTemplate::getNumberCurvilinearGrids() const
}
void
XdmfGridTemplate::insert(const shared_ptr<XdmfCurvilinearGrid> CurvilinearGrid)
XdmfGridTemplate::insert(const shared_ptr<XdmfCurvilinearGrid> /*CurvilinearGrid*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Attempting to use insert to add an XdmfCurvilinearGrid to an XdmfGridTemplate. "
"Use addStep instead of insert to add to an XdmfGridTemplate");
......@@ -368,7 +368,7 @@ XdmfGridTemplate::removeCurvilinearGrid(const unsigned int index)
}
void
XdmfGridTemplate::removeCurvilinearGrid(const std::string & Name)
XdmfGridTemplate::removeCurvilinearGrid(const std::string & /*Name*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Removing Grids by name from XdmfGridTemplate is not supported");
}
......@@ -477,7 +477,7 @@ XdmfGridTemplate::getNumberRectilinearGrids() const
}
void
XdmfGridTemplate::insert(const shared_ptr<XdmfRectilinearGrid> RectilinearGrid)
XdmfGridTemplate::insert(const shared_ptr<XdmfRectilinearGrid> /*RectilinearGrid*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Attempting to use insert to add a XdmfRectilinearGrid to an XdmfGridTemplate."
"Use addStep instead of insert to add to an XdmfGridTemplate");
......@@ -500,7 +500,7 @@ XdmfGridTemplate::removeRectilinearGrid(const unsigned int index)
}
void
XdmfGridTemplate::removeRectilinearGrid(const std::string & Name)
XdmfGridTemplate::removeRectilinearGrid(const std::string & /*Name*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Removing Grids by name from XdmfGridTemplate is not supported");
}
......@@ -609,7 +609,7 @@ XdmfGridTemplate::getNumberRegularGrids() const
}
void
XdmfGridTemplate::insert(const shared_ptr<XdmfRegularGrid> RegularGrid)
XdmfGridTemplate::insert(const shared_ptr<XdmfRegularGrid> /*RegularGrid*/)
{
XdmfError::message(XdmfError::FATAL, "Error: Attempting to use insert to add an XdmfRegularGrid to an XdmfGridTemplate."
"Use addStep instead of insert to add to an XdmfGridTemplate");
......
......@@ -411,7 +411,7 @@ XdmfRectilinearGrid::read()
// Copy stucture from read grid to this grid
copyGrid(grid);
}
else if (shared_ptr<XdmfGrid> grid = shared_dynamic_cast<XdmfGrid>(mGridController->read()))
else if (shared_dynamic_cast<XdmfGrid>(mGridController->read()))
{
XdmfError::message(XdmfError::FATAL, "Error: Grid Type Mismatch");
}
......
......@@ -447,7 +447,7 @@ XdmfRegularGrid::read()
// Copy stucture from read grid to this grid
copyGrid(grid);
}
else if (shared_ptr<XdmfGrid> grid = shared_dynamic_cast<XdmfGrid>(mGridController->read()))
else if (shared_dynamic_cast<XdmfGrid>(mGridController->read()))
{
XdmfError::message(XdmfError::FATAL, "Error: Grid Type Mismatch");
}
......
......@@ -170,8 +170,7 @@ XdmfTopology::populateItem(const std::map<std::string, std::string> & itemProper
std::map<std::string, std::string>::const_iterator type =
itemProperties.find("Offset");
if (type != itemProperties.end()) {
std::map<std::string, std::string>::const_iterator type =
itemProperties.find("BaseOffset");
type = itemProperties.find("BaseOffset");
}
if (type != itemProperties.end()) {
// Convert to double
......
......@@ -285,7 +285,7 @@ XdmfUnstructuredGrid::read()
{
copyGrid(grid);
}
else if (shared_ptr<XdmfGrid> grid = shared_dynamic_cast<XdmfGrid>(mGridController->read()))
else if (shared_dynamic_cast<XdmfGrid>(mGridController->read()))
{
XdmfError::message(XdmfError::FATAL, "Error: Grid Type Mismatch");
}
......
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