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/morkAtom.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/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 0b73f97fa..b0621c3e9 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? { |