blob: d4fe428efa26507ec5bbcf4020102405fb6b5322 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
|
diff -durr work.orig/SortKmersImpl.h work/SortKmersImpl.h
--- work.orig/SortKmersImpl.h 2009-08-20 11:25:39.336695499 +0000
+++ work/SortKmersImpl.h 2009-08-20 11:25:51.431932630 +0000
@@ -98,7 +98,7 @@
{ if ( reads[l].size( ) < KSPAN ) continue;
unsigned int N = reads[l].size( ) - KSPAN + 1;
if ( S + 2*N >= R.size( ) ) {
- unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (R.size( ) + 2*N) );
+ unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (long unsigned) (R.size( ) + 2*N) );
if ( nn < R.size( ) ) FatalErr( "SortKmers<1>: Unsigned-int overflow (R=" << R.size( ) << ")" );
R.resize(nn);
}
@@ -180,7 +180,7 @@
}
if ( q == N ) break;
if ( S + 2*N >= R.size( ) ) {
- unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (R.size( ) + 2*N) );
+ unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (long unsigned) (R.size( ) + 2*N) );
if ( nn < R.size( ) ) FatalErr( "SortKmers<10>: Unsigned-int overflow (R=" << R.size( ) << ")" );
R.resize(nn);
}
@@ -207,7 +207,7 @@
top += Min( N - top, (unsigned int) 10000 );
if ( S + 20000 >= R.size( ) || S + 2*N >= R.size( ) ) {
- unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (R.size( ) + 2*N) );
+ unsigned nn = Max( (long unsigned) ( 1.2 * R.size( ) ), (long unsigned) (R.size( ) + 2*N) );
if ( nn < R.size( ) ) FatalErr( "SortKmers<10>: Unsigned-int overflow (R=" << R.size( ) << ")" );
R.resize(nn);
}
|