Commit 1a68f59b authored by Kirill Terekhov's avatar Kirill Terekhov

another fix

parent f00fd658
...@@ -686,8 +686,8 @@ namespace INMOST ...@@ -686,8 +686,8 @@ namespace INMOST
Tag Mesh::DeleteTag(Tag tag, ElementType type_mask) Tag Mesh::DeleteTag(Tag tag, ElementType type_mask)
{ {
//std::cout << "Delete tag " << tag.GetTagName() << " type " << DataTypeName(tag.GetDataType()) << " on "; //std::cout << "Delete tag " << tag.GetTagName() << " type " << DataTypeName(tag.GetDataType()) << " on ";
for(ElementType etype = NODE; etype <= MESH; etype = NextElementType(etype)) if( (etype & type_mask) && tag.isDefined(etype) ) std::cout << ElementTypeName(etype) << " "; //for(ElementType etype = NODE; etype <= MESH; etype = NextElementType(etype)) if( (etype & type_mask) && tag.isDefined(etype) ) std::cout << ElementTypeName(etype) << " ";
std::cout << std::endl; //std::cout << std::endl;
//deallocate data on elements //deallocate data on elements
for(ElementType etype = NODE; etype <= MESH; etype = NextElementType(etype)) for(ElementType etype = NODE; etype <= MESH; etype = NextElementType(etype))
{ {
...@@ -1875,16 +1875,9 @@ namespace INMOST ...@@ -1875,16 +1875,9 @@ namespace INMOST
if( data_pos == ENUMUNDEF ) continue; if( data_pos == ENUMUNDEF ) continue;
TagManager::dense_sub_type & arr = GetDenseData(data_pos); TagManager::dense_sub_type & arr = GetDenseData(data_pos);
INMOST_DATA_ENUM_TYPE record_size = t->GetRecordSize(); INMOST_DATA_ENUM_TYPE record_size = t->GetRecordSize();
memcpy(&arr[new_addr],&arr[old_addr],record_size); TagManager::CopyData(*t,static_cast<void *>(&arr[new_addr]),static_cast<void *>(&arr[old_addr]));
#if defined(USE_AUTODIFF) //memcpy(&arr[new_addr],&arr[old_addr],record_size);
if( t->GetDataType() == DATA_VARIABLE ) DelDenseData(ComposeHandle(etypenum,old_addr),*t);
{
variable * p = static_cast<variable *>(static_cast<void *>(&arr[old_addr]));
for(INMOST_DATA_ENUM_TYPE j = 0; j < t->GetSize(); ++j) p[j] = 0.0;
}
else
#endif
memset(&arr[old_addr],0,record_size);
} }
} }
} }
......
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