mirror of
https://github.com/NGSolve/netgen.git
synced 2024-12-24 21:10:33 +05:00
fix table archive
This commit is contained in:
parent
6f044faaba
commit
300835a446
@ -171,7 +171,19 @@ namespace ngcore
|
|||||||
void DoArchive(Archive& ar)
|
void DoArchive(Archive& ar)
|
||||||
{
|
{
|
||||||
ar & size;
|
ar & size;
|
||||||
|
if(size == 0)
|
||||||
|
return;
|
||||||
|
if(ar.Input())
|
||||||
|
{
|
||||||
|
index = new IndexType[size+1];
|
||||||
|
mt.Alloc(sizeof(IndexType) * (size+1));
|
||||||
|
}
|
||||||
ar.Do(index, size+1);
|
ar.Do(index, size+1);
|
||||||
|
if(ar.Input())
|
||||||
|
{
|
||||||
|
data = new T[index[size]];
|
||||||
|
mt.Alloc(sizeof(T) * index[size]);
|
||||||
|
}
|
||||||
ar.Do(data, index[size]);
|
ar.Do(data, index[size]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user