Code optimization

This commit is contained in:
Christophe Dumez
2010-03-18 23:12:25 +00:00
parent af3755bf91
commit 52b3926f92
2 changed files with 4 additions and 4 deletions

View File

@@ -64,7 +64,7 @@ public:
// Reduce the number of pieces before creating the pixmap
// otherwise it can crash when there are too many pieces
if(nb_pieces > width()) {
int ratio = floor(nb_pieces/(double)width());
const int ratio = floor(nb_pieces/(double)width());
std::vector<bool> scaled_pieces;
std::vector<bool> scaled_downloading;
for(int i=0; i<nb_pieces; i+= ratio) {