diff options
author | red-001 <red-001@outlook.ie> | 2020-11-12 20:05:47 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-11-12 21:05:47 +0100 |
commit | 8eb2cbac613c92c1a7656ecb542e63fed9023061 (patch) | |
tree | 0d3d700df97916514ab614257b7bdce797b8ab49 /src | |
parent | 68139a28eb8b43b3685b81c77258912ffc5e0b8f (diff) | |
download | minetest-8eb2cbac613c92c1a7656ecb542e63fed9023061.tar.gz minetest-8eb2cbac613c92c1a7656ecb542e63fed9023061.tar.bz2 minetest-8eb2cbac613c92c1a7656ecb542e63fed9023061.zip |
Fix warnings about an unused variables and implicit conversion (#10586)
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/guiScrollBar.cpp | 2 | ||||
-rw-r--r-- | src/gui/guiScrollBar.h | 1 | ||||
-rw-r--r-- | src/mapgen/mg_ore.cpp | 6 |
3 files changed, 6 insertions, 3 deletions
diff --git a/src/gui/guiScrollBar.cpp b/src/gui/guiScrollBar.cpp index b04ccb9d5..c6a03f3e4 100644 --- a/src/gui/guiScrollBar.cpp +++ b/src/gui/guiScrollBar.cpp @@ -21,7 +21,7 @@ GUIScrollBar::GUIScrollBar(IGUIEnvironment *environment, IGUIElement *parent, s3 is_horizontal(horizontal), is_auto_scaling(auto_scale), dragged_by_slider(false), tray_clicked(false), scroll_pos(0), draw_center(0), thumb_size(0), min_pos(0), max_pos(100), small_step(10), - large_step(50), last_change(0), drag_offset(0), page_size(100), border_size(0) + large_step(50), drag_offset(0), page_size(100), border_size(0) { refreshControls(); setNotClipped(false); diff --git a/src/gui/guiScrollBar.h b/src/gui/guiScrollBar.h index 29493bb99..d18f8e875 100644 --- a/src/gui/guiScrollBar.h +++ b/src/gui/guiScrollBar.h @@ -68,7 +68,6 @@ private: s32 max_pos; s32 small_step; s32 large_step; - u32 last_change; s32 drag_offset; s32 page_size; s32 border_size; diff --git a/src/mapgen/mg_ore.cpp b/src/mapgen/mg_ore.cpp index b50ed6a32..5814f433a 100644 --- a/src/mapgen/mg_ore.cpp +++ b/src/mapgen/mg_ore.cpp @@ -498,7 +498,11 @@ void OreVein::generate(MMVManip *vm, int mapseed, u32 blockseed, } // randval ranges from -1..1 - float randval = (float)pr.next() / (pr.RANDOM_RANGE / 2) - 1.f; + /* + Note: can generate values slightly larger than 1 + but this can't be changed as mapgen must be deterministic accross versions. + */ + float randval = (float)pr.next() / float(pr.RANDOM_RANGE / 2) - 1.f; float noiseval = contour(noise->result[index]); float noiseval2 = contour(noise2->result[index]); if (noiseval * noiseval2 + randval * random_factor < nthresh) |