summaryrefslogtreecommitdiff
path: root/test/blocks.cxx
diff options
context:
space:
mode:
authorAlbrecht Schlosser <albrechts.fltk@online.de>2022-02-26 18:19:43 +0100
committerAlbrecht Schlosser <albrechts.fltk@online.de>2022-02-26 18:19:43 +0100
commit7810cda145dae1a0dfc739ec24078a73e3138088 (patch)
tree7fc02ce2f4f476cd0415677945185df180f0ffa0 /test/blocks.cxx
parente092b562ba2f6b966d7e18a5f4b2d6d242d954f3 (diff)
Fix Visual Studio build warnings
Diffstat (limited to 'test/blocks.cxx')
-rw-r--r--test/blocks.cxx4
1 files changed, 2 insertions, 2 deletions
diff --git a/test/blocks.cxx b/test/blocks.cxx
index a08e6ed40..f6fbbb48c 100644
--- a/test/blocks.cxx
+++ b/test/blocks.cxx
@@ -712,7 +712,7 @@ void BlockWindow::draw() {
time_t curtime = time(NULL);
frames_ ++;
if (curtime > frame_time_) {
- frames_per_second_ = (frames_per_second_ + 3 * frames_ / (curtime - frame_time_)) / 4;
+ frames_per_second_ = (frames_per_second_ + 3 * frames_ / int(curtime - frame_time_)) / 4;
frames_ = 0;
frame_time_ = curtime;
}
@@ -1054,7 +1054,7 @@ void BlockWindow::timeout_cb(BlockWindow *bw) {
for (j = 0, b = c->blocks; j < BLOCK_ROWS; j ++, b ++) {
b->bomb = bw->num_colors_ > 3 && (rand() & 127) < bw->num_colors_;
b->color = 1 + (rand() % bw->num_colors_);
- b->y = j * (BLOCK_SIZE + 8) + 24;
+ b->y = float(j * (BLOCK_SIZE + 8) + 24);
}
}
}