bug corrected. attribute member "_padding" was not initialized in Add*Attribute

This commit is contained in:
ganovelli 2010-09-01 17:16:43 +00:00
parent 885bf05702
commit 101e46bc6b
1 changed files with 5 additions and 2 deletions

View File

@ -866,7 +866,8 @@ public:
assert(i ==m.edge_attr.end() );// an attribute with this name exists assert(i ==m.edge_attr.end() );// an attribute with this name exists
} }
h._sizeof = sizeof(ATTR_TYPE); h._sizeof = sizeof(ATTR_TYPE);
h._typename = typeid(ATTR_TYPE).name(); h._padding = 0;
h._typename = typeid(ATTR_TYPE).name();
h._handle = (void*) new SimpleTempData<EdgeContainer,ATTR_TYPE>(m.edge); h._handle = (void*) new SimpleTempData<EdgeContainer,ATTR_TYPE>(m.edge);
m.attrn++; m.attrn++;
h.n_attr = m.attrn; h.n_attr = m.attrn;
@ -952,7 +953,8 @@ public:
} }
h._typename = typeid(ATTR_TYPE).name(); h._typename = typeid(ATTR_TYPE).name();
h._sizeof = sizeof(ATTR_TYPE); h._sizeof = sizeof(ATTR_TYPE);
h._handle = (void*) new SimpleTempData<FaceContainer,ATTR_TYPE>(m.face); h._padding = 0;
h._handle = (void*) new SimpleTempData<FaceContainer,ATTR_TYPE>(m.face);
m.attrn++; m.attrn++;
h.n_attr = m.attrn; h.n_attr = m.attrn;
std::pair < AttrIterator , bool> res = m.face_attr.insert(h); std::pair < AttrIterator , bool> res = m.face_attr.insert(h);
@ -1044,6 +1046,7 @@ public:
} }
h._typename = typeid(ATTR_TYPE).name(); h._typename = typeid(ATTR_TYPE).name();
h._sizeof = sizeof(ATTR_TYPE); h._sizeof = sizeof(ATTR_TYPE);
h._padding = 0;
h._handle = (void*) new Attribute<ATTR_TYPE>(); h._handle = (void*) new Attribute<ATTR_TYPE>();
m.attrn++; m.attrn++;
h.n_attr = m.attrn; h.n_attr = m.attrn;