diff options
Diffstat (limited to 'db/mork/src/morkRow.cpp')
-rw-r--r-- | db/mork/src/morkRow.cpp | 42 |
1 files changed, 24 insertions, 18 deletions
diff --git a/db/mork/src/morkRow.cpp b/db/mork/src/morkRow.cpp index ede1bf646..e68148d06 100644 --- a/db/mork/src/morkRow.cpp +++ b/db/mork/src/morkRow.cpp @@ -447,17 +447,21 @@ void morkRow::SeekColumn(morkEnv* ev, mdb_pos inPos, if ( cells && inPos < mRow_Length && inPos >= 0 ) { morkCell* c = cells + inPos; - if ( outColumn ) - *outColumn = c->GetColumn(); - if ( outYarn ) - c->mCell_Atom->GetYarn(outYarn); // nil atom works okay here + if ( outColumn ) { + *outColumn = c->GetColumn(); + } + if ( outYarn ) { + morkAtom::GetYarn(c->mCell_Atom, outYarn); + } } else { - if ( outColumn ) - *outColumn = 0; - if ( outYarn ) - ((morkAtom*) 0)->GetYarn(outYarn); // yes this will work + if ( outColumn ) { + *outColumn = 0; + } + if ( outYarn ) { + morkAtom::GetYarn((morkAtom*)0, outYarn); + } } } @@ -467,28 +471,30 @@ morkRow::NextColumn(morkEnv* ev, mdb_column* ioColumn, mdbYarn* outYarn) morkCell* cells = mRow_Cells; if ( cells ) { - mork_column last = 0; - mork_column inCol = *ioColumn; + mork_column last = 0; + mork_column inCol = *ioColumn; morkCell* end = cells + mRow_Length; while ( cells < end ) { if ( inCol == last ) // found column? { - if ( outYarn ) - cells->mCell_Atom->GetYarn(outYarn); // nil atom works okay here + if ( outYarn ) { + if (outYarn) { + morkAtom::GetYarn(cells->mCell_Atom, outYarn); + } *ioColumn = cells->GetColumn(); return; // stop, we are done - } - else - { + } + } else { last = cells->GetColumn(); ++cells; } } } - *ioColumn = 0; - if ( outYarn ) - ((morkAtom*) 0)->GetYarn(outYarn); // yes this will work + *ioColumn = 0; + if ( outYarn ) { + morkAtom::GetYarn((morkAtom*)0, outYarn); + } } morkCell* |