[MOAB-dev] commit/MOAB: 2 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Nov 25 12:59:40 CST 2013
2 new commits in MOAB:
https://bitbucket.org/fathomteam/moab/commits/5abd7c6075d8/
Changeset: 5abd7c6075d8
Branch: None
User: janehu
Date: 2013-11-25 19:40:48
Summary: Changed ReadCGM file to use different prototype for cgm14.0 and cgm13.2 and below. Passed make check for builds with cgm13.2 and cgm14.0 as well as make distcheck for both.
Affected #: 1 file
diff --git a/src/io/ReadCGM.cpp b/src/io/ReadCGM.cpp
index a610d4a..13b64fb 100644
--- a/src/io/ReadCGM.cpp
+++ b/src/io/ReadCGM.cpp
@@ -16,6 +16,7 @@
#pragma warning(disable:4786)
#endif
+#include "cgm_version.h"
#include "GeometryQueryTool.hpp"
#include "ModelQueryEngine.hpp"
#include "RefEntityName.hpp"
@@ -314,7 +315,11 @@ ErrorCode ReadCGM::load_file(const char *cgm_file_name,
// create entity sets for all ref groups
std::vector<Tag> extra_name_tags;
+#if CGM_MAJOR_VERSION>13
+ DLIList<CubitString> name_list;
+#else
DLIList<CubitString*> name_list;
+#endif
entlist.clean_out();
GeometryQueryTool::instance()->ref_entity_list( "group", entlist );
entlist.reset();
@@ -325,7 +330,11 @@ ErrorCode ReadCGM::load_file(const char *cgm_file_name,
if (name_list.size() == 0)
continue;
name_list.reset();
+#if CGM_MAJOR_VERSION>13
+ CubitString name1 = name_list.get();
+#else
CubitString name1 = *name_list.get();
+#endif
EntityHandle h;
rval = mdbImpl->create_meshset( MESHSET_SET, h );
@@ -361,7 +370,11 @@ ErrorCode ReadCGM::load_file(const char *cgm_file_name,
}
for (int j = 0; j < name_list.size(); ++j) {
+#if CGM_MAJOR_VERSION>13
+ name1 = name_list.get_and_step();
+#else
name1 = *name_list.get_and_step();
+#endif
memset( namebuf, '\0', NAME_TAG_SIZE );
strncpy( namebuf, name1.c_str(), NAME_TAG_SIZE - 1 );
if (name1.length() >= (unsigned)NAME_TAG_SIZE)
https://bitbucket.org/fathomteam/moab/commits/fe2bdf713671/
Changeset: fe2bdf713671
Branch: master
User: janehu
Date: 2013-11-25 19:57:11
Summary: Merge branch 'master' of https://bitbucket.org/fathomteam/moab
Affected #: 1 file
diff --git a/src/io/NCHelper.cpp b/src/io/NCHelper.cpp
index 44fcdc3..0f8a7fa 100644
--- a/src/io/NCHelper.cpp
+++ b/src/io/NCHelper.cpp
@@ -443,19 +443,15 @@ ErrorCode NCHelper::read_variable_to_set(std::vector<ReadNC::VarData>& vdatas, s
switch (vdatas[i].varDataType) {
case NC_BYTE:
case NC_CHAR:
- delete (char*) data;
+ delete[] (char*) data;
break;
case NC_DOUBLE:
- delete (double*) data;
- break;
case NC_FLOAT:
- delete (float*) data;
+ delete[] (double*) data;
break;
case NC_INT:
- delete (int*) data;
- break;
case NC_SHORT:
- delete (short*) data;
+ delete[] (int*) data;
break;
default:
break;
@@ -860,7 +856,7 @@ ErrorCode NCHelper::read_variable_to_set_allocate(std::vector<ReadNC::VarData>&
vdatas[i].varDatas[t] = new int[sz];
break;
default:
- std::cerr << "Unrecognized data type for tag " << std::endl;
+ std::cerr << "Unrecognized data type for set variable tag values" << std::endl;
rval = MB_FAILURE;
}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
More information about the moab-dev
mailing list