Rif. mod. 96/2. Correzione metodo TRectype::operator=().
La correzione riguarda la copia dei campi memo (prima non c'era). git-svn-id: svn://10.65.10.50/trunk@2383 c028cbd2-c16b-5b4b-a496-9718f37d4682
This commit is contained in:
parent
d12de9d600
commit
4bd466537c
@ -2902,8 +2902,22 @@ TRectype& TRectype::operator =(const TRectype& rec)
|
||||
|
||||
{
|
||||
CHECK(num() == rec.num(), "Can't assign records of different file");
|
||||
|
||||
memcpy(_rec, rec._rec, _length); // Copy contents
|
||||
|
||||
memcpy(_rec, rec._rec, _length); // Copy contents
|
||||
if (_memoinfo)
|
||||
{
|
||||
TTrec r;
|
||||
r.get(_logicnum);
|
||||
RecDes* rd = r.rec();
|
||||
const int nfields = r.fields( );
|
||||
for( int i = 0; i < nfields; i ++ )
|
||||
{
|
||||
const char* name = rd->Fd[i].Name;
|
||||
const unsigned int offset = rd->Fd[i].RecOff;
|
||||
if ( rd->Fd[i].TypeF == _memofld )
|
||||
_memoinfo->put(name,rec.get(name)); // Copy memo fields
|
||||
}
|
||||
}
|
||||
setempty(rec.empty()); // Copy emptiness status
|
||||
return *this;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user