aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorlloyd <[email protected]>2008-09-07 18:41:38 +0000
committerlloyd <[email protected]>2008-09-07 18:41:38 +0000
commit67f1970cf168c4d6b0c773555039a6308694ef9f (patch)
treeaf82f2d1831a652664b47d777aef6f196e3b784d /src
parent3615001dbdd743413d358a5d815baa8555cc4e79 (diff)
Inline BigInt::Rep::operator[], BigInt::sig_words, and BigInt::Rep::sig_words
Diffstat (limited to 'src')
-rw-r--r--src/bigint.cpp58
1 files changed, 0 insertions, 58 deletions
diff --git a/src/bigint.cpp b/src/bigint.cpp
index 7fb5896f3..b324fd851 100644
--- a/src/bigint.cpp
+++ b/src/bigint.cpp
@@ -235,64 +235,6 @@ void BigInt::mask_bits(u32bit n)
}
/*************************************************
-* Count the significant words, if cached value is
-* not valid
-*************************************************/
-u32bit BigInt::Rep::sig_words() const
- {
- if(sig == INVALID_SIG_WORD)
- {
- const word* x = reg.begin();
- u32bit top_set = reg.size();
-
- while(top_set >= 4)
- {
- if(x[top_set-1])
- break;
- if(x[top_set-2])
- break;
- if(x[top_set-3])
- break;
- if(x[top_set-4])
- break;
-
- top_set -= 4;
- }
- while(top_set && (x[top_set-1] == 0))
- top_set--;
-
- sig = top_set;
- }
-
- return sig;
- }
-
-word& BigInt::Rep::operator[](u32bit n)
- {
- sig = INVALID_SIG_WORD;
-
- if(n > reg.size())
- reg.grow_to(n+1);
- return reg[n];
- }
-
-word BigInt::Rep::operator[](u32bit n) const
- {
- if(n > reg.size())
- return 0;
- return reg[n];
- }
-
-
-/*************************************************
-* Count the significant words *
-*************************************************/
-u32bit BigInt::sig_words() const
- {
- return rep.sig_words();
- }
-
-/*************************************************
* Count how many bytes are being used *
*************************************************/
u32bit BigInt::bytes() const