diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:49:50 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-11 01:49:50 -0500 |
commit | a081e71becb76a90ba6bd82ceb27ce2e0274ea36 (patch) | |
tree | 8ab2a38c09255adbf81d155c3acfe58b6211f38c /db/mork/src/morkRow.cpp | |
parent | 64f423eb409bbd77e0c9e59e5cfefdfedb472adc (diff) | |
download | UXP-a081e71becb76a90ba6bd82ceb27ce2e0274ea36.tar UXP-a081e71becb76a90ba6bd82ceb27ce2e0274ea36.tar.gz UXP-a081e71becb76a90ba6bd82ceb27ce2e0274ea36.tar.lz UXP-a081e71becb76a90ba6bd82ceb27ce2e0274ea36.tar.xz UXP-a081e71becb76a90ba6bd82ceb27ce2e0274ea36.zip |
Bug 1568095 - Make morkAtom::GetYarn() static.
Tag #1273
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* |