Merge pull request #1158 from barfowl/examples_msvc_warnings

Fixed Microsoft Visual Studio warnings in examples
This commit is contained in:
David G Yu 2019-08-19 18:18:08 -07:00 committed by GitHub
commit 21d2a89455
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -143,7 +143,7 @@ protected:
v = std::max(std::min(v, max), min);
if (intStep) {
// MSVC 2010 does not have std::round() or roundf()
v = v>0.0f ? floor(v+0.5f) : ceil(v-0.5f);
v = v>0.0f ? floorf(v+0.5f) : ceilf(v-0.5f);
}
value = v;
}

View File

@ -988,7 +988,7 @@ initHUD() {
g_hud.AddPullDownButton(shading_pulldown, "Shaded", 1, g_wire==1);
g_hud.AddPullDownButton(shading_pulldown, "Wire+Shaded", 2, g_wire==2);
g_hud.AddSlider("Brush size", 10, 500, g_brushSize,
g_hud.AddSlider("Brush size", 10.0f, 500.0f, (float)g_brushSize,
350, -60, 40, true, callbackBrushSize, 0);
for (int i = 1; i < 11; ++i) {