Skip to content

Commit 2fbc7af

Browse files
authored
Merge pull request #168 from timetravellers/feature-clone-field
fix enum for compile with gcc/4.9.2
2 parents 6f3c392 + 209290c commit 2fbc7af

File tree

2 files changed

+8
-7
lines changed

2 files changed

+8
-7
lines changed

apf/apfConvert.cc

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
#include <map>
99
#include <pcu_util.h>
1010
#include <iostream>
11+
#include <cstdlib>
1112

1213
namespace apf {
1314

@@ -231,17 +232,17 @@ class Converter
231232
int* intData;
232233
long* lngData;
233234
switch (tagType) {
234-
case apf::Mesh::TagType::DOUBLE:
235+
case apf::Mesh::DOUBLE:
235236
dblData = new double[tagSize];
236237
inMesh->getDoubleTag(e, in, dblData);
237238
outMesh->setDoubleTag(newFromOld[e], out, dblData);
238239
break;
239-
case apf::Mesh::TagType::INT:
240+
case apf::Mesh::INT:
240241
intData = new int[tagSize];
241242
inMesh->getIntTag(e, in, intData);
242243
outMesh->setIntTag(newFromOld[e], out, intData);
243244
break;
244-
case apf::Mesh::TagType::LONG:
245+
case apf::Mesh::LONG:
245246
lngData = new long[tagSize];
246247
inMesh->getLongTag(e, in, lngData);
247248
outMesh->setLongTag(newFromOld[e], out, lngData);
@@ -319,13 +320,13 @@ class Converter
319320
if (!outMesh->findTag(tagName)) {
320321
apf::MeshTag* out = NULL;
321322
switch (tagType) {
322-
case apf::Mesh::TagType::DOUBLE:
323+
case apf::Mesh::DOUBLE:
323324
out = outMesh->createDoubleTag(tagName, tagSize);
324325
break;
325-
case apf::Mesh::TagType::INT:
326+
case apf::Mesh::INT:
326327
out = outMesh->createIntTag(tagName, tagSize);
327328
break;
328-
case apf::Mesh::TagType::LONG:
329+
case apf::Mesh::LONG:
329330
out = outMesh->createLongTag(tagName, tagSize);
330331
break;
331332
default:

test/verify_convert.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ apf::Mesh2* createMesh()
2424
m->createVertex(NULL, apf::Vector3(0, 0, 0), apf::Vector3(0, 0, 0));
2525
verts[1] =
2626
m->createVertex(NULL, apf::Vector3(1, 0, 0), apf::Vector3(1, 0, 0));
27-
m->createEntity(apf::Mesh::Type::EDGE, NULL, verts);
27+
m->createEntity(apf::Mesh::EDGE, NULL, verts);
2828
return m;
2929
}
3030
class twox : public apf::Function {

0 commit comments

Comments
 (0)