Commit b76c0b74 authored by Kenneth Leiter's avatar Kenneth Leiter

COMP: Remove unused arguments from functions.

Get rid of some compiler warnings by removing unused argument names
from methods.
parent d51c5f3e
......@@ -41,7 +41,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return;
}
......@@ -63,7 +63,7 @@ public:
}
private:
XdmfArray * const mArray;
};
......@@ -78,7 +78,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return;
}
......@@ -92,7 +92,7 @@ public:
template<typename T>
void
operator()(const boost::shared_array<const T> & array) const
operator()(const boost::shared_array<const T> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -175,7 +175,7 @@ public:
}
shared_ptr<const XdmfArrayType>
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
if(mHeavyDataController) {
return mHeavyDataController->getType();
......@@ -210,7 +210,7 @@ public:
}
unsigned int
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return 0;
}
......@@ -224,7 +224,7 @@ public:
template<typename T>
unsigned int
operator()(const boost::shared_array<const T> & array) const
operator()(const boost::shared_array<const T> &) const
{
return 0;
}
......@@ -239,7 +239,7 @@ public:
}
const void *
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return NULL;
}
......@@ -310,7 +310,7 @@ public:
}
std::string
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return "";
}
......@@ -357,7 +357,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize(mArrayToCopy->getArrayType());
boost::apply_visitor(*this,
......@@ -413,14 +413,14 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return;
}
template<typename T>
void
operator()(const shared_ptr<std::vector<T> > & array) const
operator()(const shared_ptr<std::vector<T> > &) const
{
return;
}
......@@ -449,21 +449,21 @@ public:
}
bool
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return false;
}
template<typename T>
bool
operator()(const shared_ptr<std::vector<T> > & array) const
operator()(const shared_ptr<std::vector<T> > &) const
{
return true;
}
template<typename T>
bool
operator()(const boost::shared_array<const T> & array) const
operator()(const T &) const
{
return true;
}
......@@ -480,7 +480,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->mTmpReserveSize = mSize;
}
......@@ -494,7 +494,7 @@ public:
template<typename T>
void
operator()(const boost::shared_array<const T> & array) const
operator()(const boost::shared_array<const T> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -516,7 +516,7 @@ public:
}
unsigned int
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
if(mArray->mHeavyDataController) {
return mArray->mHeavyDataController->getSize();
......@@ -533,14 +533,14 @@ public:
template<typename T>
unsigned int
operator()(const boost::shared_array<const T> & array) const
operator()(const boost::shared_array<const T> &) const
{
return mArray->mArrayPointerNumValues;
}
private:
const XdmfArray * const mArray;
const XdmfArray * const mArray;
};
shared_ptr<XdmfArray>
......@@ -567,7 +567,7 @@ const std::string XdmfArray::ItemTag = "DataItem";
void
XdmfArray::clear()
{
boost::apply_visitor(Clear(this),
boost::apply_visitor(Clear(this),
mArray);
mDimensions.clear();
}
......@@ -584,14 +584,14 @@ XdmfArray::erase(const unsigned int index)
shared_ptr<const XdmfArrayType>
XdmfArray::getArrayType() const
{
return boost::apply_visitor(GetArrayType(mHeavyDataController),
return boost::apply_visitor(GetArrayType(mHeavyDataController),
mArray);
}
unsigned int
XdmfArray::getCapacity() const
{
return boost::apply_visitor(GetCapacity(),
return boost::apply_visitor(GetCapacity(),
mArray);
}
......@@ -640,7 +640,7 @@ XdmfArray::getItemProperties() const
else {
arrayProperties.insert(std::make_pair("Format", "XML"));
}
arrayProperties.insert(std::make_pair("Dimensions",
arrayProperties.insert(std::make_pair("Dimensions",
this->getDimensionsString()));
if(mName.compare("") != 0) {
arrayProperties.insert(std::make_pair("Name", mName));
......@@ -665,7 +665,7 @@ XdmfArray::getName() const
unsigned int
XdmfArray::getSize() const
{
return boost::apply_visitor(Size(this),
return boost::apply_visitor(Size(this),
mArray);
}
......@@ -679,14 +679,14 @@ XdmfArray::getValuesInternal()
const void *
XdmfArray::getValuesInternal() const
{
return boost::apply_visitor(GetValuesPointer(),
return boost::apply_visitor(GetValuesPointer(),
mArray);
}
std::string
XdmfArray::getValuesString() const
{
return boost::apply_visitor(GetValuesString(mArrayPointerNumValues),
return boost::apply_visitor(GetValuesString(mArrayPointerNumValues),
mArray);
}
......@@ -728,7 +728,7 @@ XdmfArray::initialize(const shared_ptr<const XdmfArrayType> arrayType,
this->release();
}
else {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"Array of unsupported type in XdmfArray::initialize");
}
}
......@@ -774,7 +774,7 @@ XdmfArray::isInitialized() const
void
XdmfArray::internalizeArrayPointer()
{
boost::apply_visitor(InternalizeArrayPointer(this),
boost::apply_visitor(InternalizeArrayPointer(this),
mArray);
}
......@@ -785,13 +785,13 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
{
XdmfItem::populateItem(itemProperties, childItems, reader);
const shared_ptr<const XdmfArrayType> arrayType =
const shared_ptr<const XdmfArrayType> arrayType =
XdmfArrayType::New(itemProperties);
std::map<std::string, std::string>::const_iterator content =
itemProperties.find("Content");
if(content == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"'Content' not found in itemProperties in "
"XdmfArray::populateItem");
}
......@@ -800,11 +800,11 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
std::map<std::string, std::string>::const_iterator dimensions =
itemProperties.find("Dimensions");
if(dimensions == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"'Dimensions' not found in itemProperties in "
"XdmfArray::populateItem");
}
boost::tokenizer<> tokens(dimensions->second);
for(boost::tokenizer<>::const_iterator iter = tokens.begin();
iter != tokens.end();
......@@ -815,7 +815,7 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
std::map<std::string, std::string>::const_iterator format =
itemProperties.find("Format");
if(format == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"'Format' not found in itemProperties in "
"XdmfArray::populateItem");
}
......@@ -824,12 +824,12 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
if(formatVal.compare("HDF") == 0) {
size_t colonLocation = contentVal.find(":");
if(colonLocation == std::string::npos) {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"':' not found in content in "
"XdmfArray::populateItem -- double check an HDF5 "
"data set is specified for the file");
}
std::string hdf5Path = contentVal.substr(0, colonLocation);
const std::string dataSetPath =
contentVal.substr(colonLocation + 1,
......@@ -841,7 +841,7 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
std::map<std::string, std::string>::const_iterator xmlDir =
itemProperties.find("XMLDir");
if(xmlDir == itemProperties.end()) {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"'XMLDir' not found in itemProperties in "
"XdmfArray::populateItem");
}
......@@ -885,7 +885,7 @@ XdmfArray::populateItem(const std::map<std::string, std::string> & itemPropertie
}
}
else {
XdmfError::message(XdmfError::FATAL,
XdmfError::message(XdmfError::FATAL,
"Neither 'HDF' nor 'XML' specified as 'Format' "
"in XdmfArray::populateItem");
}
......
......@@ -541,7 +541,7 @@ private:
boost::shared_array<const unsigned char>,
boost::shared_array<const unsigned short>,
boost::shared_array<const unsigned int> > ArrayVariant;
ArrayVariant mArray;
unsigned int mArrayPointerNumValues;
std::vector<unsigned int> mDimensions;
......
......@@ -36,7 +36,7 @@ public:
}
T
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return 0;
}
......@@ -67,7 +67,7 @@ private:
};
template <>
class XdmfArray::GetValue<std::string> :
class XdmfArray::GetValue<std::string> :
public boost::static_visitor<std::string> {
public:
......@@ -77,7 +77,7 @@ public:
}
std::string
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return "";
}
......@@ -135,7 +135,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return;
}
......@@ -195,7 +195,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
return;
}
......@@ -253,7 +253,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<T>();
boost::apply_visitor(*this,
......@@ -298,7 +298,7 @@ public:
template<typename U>
void
operator()(boost::shared_array<const U> & array) const
operator()(boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -338,7 +338,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<std::string>();
boost::apply_visitor(*this,
......@@ -382,7 +382,7 @@ public:
template<typename U>
void
operator()(boost::shared_array<const U> & array) const
operator()(boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -412,7 +412,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<T>();
boost::apply_visitor(*this,
......@@ -438,7 +438,7 @@ public:
template<typename U>
void
operator()(const boost::shared_array<const U> & array) const
operator()(const boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -463,7 +463,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<std::string>();
boost::apply_visitor(*this,
......@@ -487,7 +487,7 @@ public:
template<typename U>
void
operator()(const boost::shared_array<const U> & array) const
operator()(const boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -514,7 +514,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<T>();
boost::apply_visitor(*this,
......@@ -540,7 +540,7 @@ public:
template<typename U>
void
operator()(const boost::shared_array<const U> & array) const
operator()(const boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -568,7 +568,7 @@ public:
}
void
operator()(const boost::blank & array) const
operator()(const boost::blank &) const
{
mArray->initialize<std::string>();
boost::apply_visitor(*this,
......@@ -592,7 +592,7 @@ public:
template<typename U>
void
operator()(const boost::shared_array<const U> & array) const
operator()(const boost::shared_array<const U> &) const
{
mArray->internalizeArrayPointer();
boost::apply_visitor(*this,
......@@ -685,12 +685,12 @@ XdmfArray::insert(const unsigned int index,
const T & value)
{
boost::apply_visitor(Insert<T>(this,
index,
&value,
1,
0,
0,
mDimensions),
index,
&value,
1,
0,
0,
mDimensions),
mArray);
}
......@@ -717,8 +717,8 @@ void
XdmfArray::pushBack(const T & value)
{
return boost::apply_visitor(PushBack<T>(value,
this),
mArray);
this),
mArray);
}
template<typename T>
......@@ -727,8 +727,8 @@ XdmfArray::resize(const unsigned int numValues,
const T & value)
{
return boost::apply_visitor(Resize<T>(this,
numValues,
value),
numValues,
value),
mArray);
}
......@@ -793,7 +793,7 @@ XdmfArray::swap(std::vector<T> & array)
this->internalizeArrayPointer();
if(!this->isInitialized()) {
this->initialize<T>();
}
}
try {
shared_ptr<std::vector<T> > currArray =
boost::get<shared_ptr<std::vector<T> > >(mArray);
......
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