MCPcopy Create free account
hub / github.com/c3d/tao3D / IsConvertableToLong

Method IsConvertableToLong

libcryptopp/cryptopp/integer.cpp:2797–2809  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2795}
2796
2797bool Integer::IsConvertableToLong() const
2798{
2799 if (ByteCount() > sizeof(long))
2800 return false;
2801
2802 unsigned long value = (unsigned long)reg[0];
2803 value += SafeLeftShift<WORD_BITS, unsigned long>((unsigned long)reg[1]);
2804
2805 if (sign==POSITIVE)
2806 return (signed long)value >= 0;
2807 else
2808 return -(signed long)value < 0;
2809}
2810
2811signed long Integer::ConvertToLong() const
2812{

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected