34 start = 0; |
34 start = 0; |
35 if (end>mBuffer.size() - 1) |
35 if (end>mBuffer.size() - 1) |
36 end = mBuffer.size() - 1; |
36 end = mBuffer.size() - 1; |
37 |
37 |
38 for ( int i = start; i <= end; i++){ |
38 for ( int i = start; i <= end; i++){ |
39 mBuffer.replace(i, false); |
39 if (mBuffer.value(i) == true){ |
|
40 mBuffer.replace(i, false); |
|
41 } else { |
|
42 // qWarning()<<QString("release released item %1").arg(i); |
|
43 } |
40 } |
44 } |
41 } |
45 } |
42 |
46 |
43 void BMHelper::request(int start, int end, HgRequestOrder order) |
47 void BMHelper::request(int start, int end, HgRequestOrder order) |
44 { |
48 { |
45 Q_UNUSED(order); |
49 Q_UNUSED(order); |
46 if ( start<0) |
50 if ( start<0) |
47 start = 0; |
51 start = 0; |
48 if (end>mBuffer.size() - 1) |
52 if (end>mBuffer.size() - 1) |
49 end = mBuffer.size() - 1; |
53 end = mBuffer.size() - 1; |
50 |
54 |
51 for ( int i = start; i <= end; i++){ |
55 for ( int i = start; i <= end; i++){ |
52 mBuffer.replace(i, true); |
56 if (mBuffer.value(i) == false){ |
|
57 mBuffer.replace(i, true); |
|
58 } else { |
|
59 // qWarning()<<QString("request requested item %1").arg(i); |
|
60 } |
53 } |
61 } |
54 } |
62 } |
55 |
63 |
56 bool BMHelper::isIntergal(int bufferSize) |
64 bool BMHelper::isIntergal(int bufferSize) |
57 { |
65 { |