[Scummvm-git-logs] scummvm master -> ad7450d5ce464ba4d50d88fbe2b2bcfba5ec09ec

digitall noreply at scummvm.org
Tue Apr 19 10:42:56 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:
ad7450d5ce AGS: Fix GCC Compiler Warnings


Commit: ad7450d5ce464ba4d50d88fbe2b2bcfba5ec09ec
    https://github.com/scummvm/scummvm/commit/ad7450d5ce464ba4d50d88fbe2b2bcfba5ec09ec
Author: D G Turner (digitall at scummvm.org)
Date: 2022-04-19T11:42:26+01:00

Commit Message:
AGS: Fix GCC Compiler Warnings

Changed paths:
    engines/ags/engine/ac/gui.cpp
    engines/ags/plugins/ags_plugin.cpp


diff --git a/engines/ags/engine/ac/gui.cpp b/engines/ags/engine/ac/gui.cpp
index 0506dc9f356..519a655214f 100644
--- a/engines/ags/engine/ac/gui.cpp
+++ b/engines/ags/engine/ac/gui.cpp
@@ -338,7 +338,7 @@ void process_interface_click(int ifce, int btn, int mbut) {
 			(!theObj->EventHandlers[0].IsEmpty()) &&
 			(!_G(gameinst)->GetSymbolAddress(theObj->EventHandlers[0].GetCStr()).IsNull())) {
 			// control-specific event handler
-			if (theObj->GetEventArgs(0).FindChar(',') != -1) {
+			if (theObj->GetEventArgs(0).FindChar(',') != Common::String::npos) {
 				RuntimeScriptValue params[]{ RuntimeScriptValue().SetDynamicObject(theObj, &_GP(ccDynamicGUIObject)),
 					RuntimeScriptValue().SetInt32(mbut) };
 				QueueScriptFunction(kScInstGame, theObj->EventHandlers[0].GetCStr(), 2, params);
diff --git a/engines/ags/plugins/ags_plugin.cpp b/engines/ags/plugins/ags_plugin.cpp
index 8276c8d87ce..c2f52d20124 100644
--- a/engines/ags/plugins/ags_plugin.cpp
+++ b/engines/ags/plugins/ags_plugin.cpp
@@ -617,7 +617,7 @@ int IAGSEngine::CallGameScriptFunction(const char *name, int32 globalScript, int
 		   RuntimeScriptValue().SetPluginArgument(arg2),
 		   RuntimeScriptValue().SetPluginArgument(arg3),
 	};
-	int toret = RunScriptFunction(toRun, (char *)name, numArgs, params);
+	int toret = RunScriptFunction(toRun, name, numArgs, params);
 	return toret;
 }
 




More information about the Scummvm-git-logs mailing list