[MOAB-dev] r5303 - MOAB/trunk/src
tautges at mcs.anl.gov
tautges at mcs.anl.gov
Tue Jan 10 17:44:46 CST 2012
Author: tautges
Date: 2012-01-10 17:44:45 -0600 (Tue, 10 Jan 2012)
New Revision: 5303
Modified:
MOAB/trunk/src/DenseTag.cpp
MOAB/trunk/src/DenseTag.hpp
Log:
Making const and non-const versions of one of the get_array functions.
Passes make check in serial and parallel.
Modified: MOAB/trunk/src/DenseTag.cpp
===================================================================
--- MOAB/trunk/src/DenseTag.cpp 2012-01-10 23:15:57 UTC (rev 5302)
+++ MOAB/trunk/src/DenseTag.cpp 2012-01-10 23:44:45 UTC (rev 5303)
@@ -123,9 +123,15 @@
}
ErrorCode DenseTag::get_array( const EntitySequence* seq,
- const unsigned char* const& ptr) const
+ const unsigned char* const & ptr) const
{
- ptr = reinterpret_cast<unsigned char*>(seq->data()->get_tag_data( mySequenceArray ));
+ return get_array(seq, ptr);
+}
+
+ErrorCode DenseTag::get_array( const EntitySequence* seq,
+ const unsigned char* & ptr) const
+{
+ ptr = reinterpret_cast<const unsigned char*>(seq->data()->get_tag_data( mySequenceArray ));
if (ptr)
ptr += get_size() * (seq->start_handle() - seq->data()->start_handle());
@@ -210,7 +216,7 @@
{
ErrorCode rval;
size_t avail;
- const unsigned char* array;
+ const unsigned char* array = NULL; // initialize to get rid of warning
unsigned char* data = reinterpret_cast<unsigned char*>(values);
for (Range::const_pair_iterator p = entities.const_pair_begin();
@@ -248,7 +254,7 @@
ErrorCode result;
const EntityHandle *const end = entities + num_entities;
size_t junk;
- const unsigned char* ptr;
+ const unsigned char* ptr = NULL; // initialize to get rid of warning
if (data_lengths) {
const int len = get_size();
@@ -627,7 +633,7 @@
}
}
else {
- const unsigned char* array;
+ const unsigned char* array = NULL; // initialize to get rid of warning
size_t count;
ErrorCode rval;
@@ -665,7 +671,7 @@
More information about the moab-dev
mailing list