Commit 4bb47fc4 authored by Kenneth Leiter's avatar Kenneth Leiter

COMP: Get rid of some intel compiler warnings in XdmfArray and test.

parent 65d1f846
......@@ -159,7 +159,7 @@ public:
};
class XdmfArray::GetValuesPointer :
public boost::static_visitor<const void * const> {
public boost::static_visitor<const void *> {
public:
GetValuesPointer()
......@@ -167,14 +167,14 @@ public:
}
template<typename T>
const void * const
const void *
operator()(const shared_ptr<std::vector<T> > & array) const
{
return &array->operator[](0);
}
template<typename T>
const void * const
const void *
operator()(const boost::shared_array<const T> & array) const
{
return array.get();
......@@ -199,7 +199,7 @@ public:
getValuesString(const T * const array,
const int numValues) const
{
const unsigned int lastIndex = numValues-1;
const int lastIndex = numValues - 1;
if(lastIndex < 0) {
return "";
......
......@@ -277,6 +277,8 @@ public:
void initialize(const shared_ptr<const XdmfArrayType> arrayType,
const std::vector<unsigned int> & dimensions);
using XdmfItem::insert;
/**
* Insert value into this array
*
......@@ -340,7 +342,6 @@ public:
* Read data from disk into memory.
*/
void read();
/**
* Release all data currently held in memory.
*/
......
......@@ -26,8 +26,8 @@ int main(int, char **)
assert(array->getSize() == 4);
assert(array->getArrayType() == XdmfArrayType::Int32());
assert(array->getValuesString().compare("1 2 3 4") == 0);
const int * const arrayPointer =
(const int * const)array->getValuesInternal();
const int * const arrayPointer =
static_cast<int *>(array->getValuesInternal());
assert(arrayPointer[0] == 1);
assert(arrayPointer[1] == 2);
assert(arrayPointer[2] == 3);
......@@ -121,8 +121,8 @@ int main(int, char **)
assert(array5->getSize() == 2);
assert(array5->getArrayType() == XdmfArrayType::Int32());
assert(array5->getValuesString().compare("1 2") == 0);
const int * const array5Pointer =
(const int * const)array5->getValuesInternal();
const int * const array5Pointer =
static_cast<int *>(array5->getValuesInternal());
assert(array5Pointer[0] == 1);
assert(array5Pointer[1] == 2);
// Assert we can copy values out correctly
......
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