diff options
Diffstat (limited to 'db/mork/src/morkAtom.cpp')
-rw-r--r-- | db/mork/src/morkAtom.cpp | 29 |
1 files changed, 12 insertions, 17 deletions
diff --git a/db/mork/src/morkAtom.cpp b/db/mork/src/morkAtom.cpp index 0b73f97fae..b0621c3e93 100644 --- a/db/mork/src/morkAtom.cpp +++ b/db/mork/src/morkAtom.cpp @@ -29,40 +29,35 @@ //3456789_123456789_123456789_123456789_123456789_123456789_123456789_123456789 -mork_bool -morkAtom::GetYarn(mdbYarn* outYarn) const +/* static */ +mork_bool morkAtom::GetYarn(const morkAtom* atom, mdbYarn* outYarn) { const void* source = 0; mdb_fill fill = 0; mdb_cscode form = 0; outYarn->mYarn_More = 0; - if ( this->IsWeeBook() ) - { - morkWeeBookAtom* weeBook = (morkWeeBookAtom*) this; + if (atom) { + if (atom->IsWeeBook()) { + morkWeeBookAtom* weeBook = (morkWeeBookAtom*)atom; source = weeBook->mWeeBookAtom_Body; fill = weeBook->mAtom_Size; - } - else if ( this->IsBigBook() ) - { - morkBigBookAtom* bigBook = (morkBigBookAtom*) this; + } else if (atom->IsBigBook()) { + morkBigBookAtom* bigBook = (morkBigBookAtom*)atom; source = bigBook->mBigBookAtom_Body; fill = bigBook->mBigBookAtom_Size; form = bigBook->mBigBookAtom_Form; - } - else if ( this->IsWeeAnon() ) - { - morkWeeAnonAtom* weeAnon = (morkWeeAnonAtom*) this; + } else if (atom->IsWeeAnon()) { + morkWeeAnonAtom* weeAnon = (morkWeeAnonAtom*)atom; source = weeAnon->mWeeAnonAtom_Body; fill = weeAnon->mAtom_Size; - } - else if ( this->IsBigAnon() ) - { - morkBigAnonAtom* bigAnon = (morkBigAnonAtom*) this; + } else if (atom->IsBigAnon()) { + morkBigAnonAtom* bigAnon = (morkBigAnonAtom*)atom; source = bigAnon->mBigAnonAtom_Body; fill = bigAnon->mBigAnonAtom_Size; form = bigAnon->mBigAnonAtom_Form; } + } if ( source && fill ) // have an atom with nonempty content? { |