changed: some return values has been cleaned in ttmathuint.h

(eclipse builtin parser reported errors but actually the code was correct)



git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@1050 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
Tomasz Sowa 2017-03-12 12:35:50 +00:00
parent b36821024b
commit f06592376f
1 changed files with 15 additions and 6 deletions

View File

@ -955,17 +955,20 @@ public:
switch( algorithm )
{
case 1:
return Mul1Big(ss2, result);
Mul1Big(ss2, result);
break;
case 2:
return Mul2Big(ss2, result);
Mul2Big(ss2, result);
break;
case 3:
return Mul3Big(ss2, result);
Mul3Big(ss2, result);
break;
case 100:
default:
return MulFastestBig(ss2, result);
MulFastestBig(ss2, result);
}
}
@ -1501,7 +1504,10 @@ public:
void MulFastestBig(const UInt<value_size> & ss2, UInt<value_size*2> & result)
{
if( value_size < TTMATH_USE_KARATSUBA_MULTIPLICATION_FROM_SIZE )
return Mul2Big(ss2, result);
{
Mul2Big(ss2, result);
return;
}
uint x1size = value_size, x2size = value_size;
uint x1start = 0, x2start = 0;
@ -1523,9 +1529,12 @@ public:
uint distancex2 = x2size - x2start;
if( distancex1 < 3 || distancex2 < 3 )
{
// either 'this' or 'ss2' have only 2 (or 1) items different from zero (side by side)
// (this condition in the future can be improved)
return Mul2Big3<value_size>(table, ss2.table, result, x1start, x1size, x2start, x2size);
Mul2Big3<value_size>(table, ss2.table, result, x1start, x1size, x2start, x2size);
return;
}
// Karatsuba multiplication