[Scummvm-git-logs] scummvm master -> c5e39ab5e35515a42d14c65f14ecbc1fc2d084fb
lephilousophe
noreply at scummvm.org
Tue May 3 21:36:47 UTC 2022
This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .
Summary:
c5e39ab5e3 AGS: Fix int vs int32 discrepancies
Commit: c5e39ab5e35515a42d14c65f14ecbc1fc2d084fb
https://github.com/scummvm/scummvm/commit/c5e39ab5e35515a42d14c65f14ecbc1fc2d084fb
Author: Le Philousophe (lephilousophe at users.noreply.github.com)
Date: 2022-05-03T23:36:12+02:00
Commit Message:
AGS: Fix int vs int32 discrepancies
Changed paths:
engines/ags/engine/ac/listbox.cpp
engines/ags/engine/ac/slider.cpp
diff --git a/engines/ags/engine/ac/listbox.cpp b/engines/ags/engine/ac/listbox.cpp
index 9435527b427..822e322e4b5 100644
--- a/engines/ags/engine/ac/listbox.cpp
+++ b/engines/ags/engine/ac/listbox.cpp
@@ -339,7 +339,7 @@ int ListBox_GetTopItem(GUIListBox *listbox) {
void ListBox_SetTopItem(GUIListBox *guisl, int item) {
if ((item >= guisl->ItemCount) || (item < 0)) {
- item = Math::Clamp(item, 0, guisl->ItemCount);
+ item = Math::Clamp<int>(item, 0, guisl->ItemCount);
debug_script_warn("ListBoxSetTopItem: tried to set top to beyond top or bottom of list");
}
if (guisl->TopItem != item) {
diff --git a/engines/ags/engine/ac/slider.cpp b/engines/ags/engine/ac/slider.cpp
index 93b15c55ff8..2b7145b2cd6 100644
--- a/engines/ags/engine/ac/slider.cpp
+++ b/engines/ags/engine/ac/slider.cpp
@@ -70,7 +70,7 @@ int Slider_GetMin(GUISlider *guisl) {
}
void Slider_SetValue(GUISlider *guisl, int valn) {
- valn = Math::Clamp(valn, guisl->MinValue, guisl->MaxValue);
+ valn = Math::Clamp<int>(valn, guisl->MinValue, guisl->MaxValue);
if (valn != guisl->Value) {
guisl->Value = valn;
More information about the Scummvm-git-logs
mailing list