[Scummvm-git-logs] scummvm master -> 449f14317ec31c59d3473bfa06e0c249e08b11b9

criezy noreply at scummvm.org
Tue Jun 6 08:05:00 UTC 2023


This automated email contains information about 3 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
4dcde68f4a AGS: Remove unnecessary include of std/math.h
22dae3061e AGS: Use C99 isnan instead of std::isnan
449f14317e AGS: Remove std math wrapper


Commit: 4dcde68f4a2eda61158617972f759240cb661a36
    https://github.com/scummvm/scummvm/commit/4dcde68f4a2eda61158617972f759240cb661a36
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-06-06T08:59:58+01:00

Commit Message:
AGS: Remove unnecessary include of std/math.h

Changed paths:
    engines/ags/engine/ac/character.cpp
    engines/ags/engine/ac/display.cpp
    engines/ags/engine/ac/dynamic_sprite.cpp
    engines/ags/engine/ac/global_game.cpp
    engines/ags/engine/ac/route_finder_impl_legacy.cpp
    engines/ags/engine/ac/route_finder_jps.cpp
    engines/ags/engine/main/update.cpp
    engines/ags/lib/std/std.cpp
    engines/ags/shared/gui/gui_inv.cpp


diff --git a/engines/ags/engine/ac/character.cpp b/engines/ags/engine/ac/character.cpp
index 84f0713a864..4cd92697088 100644
--- a/engines/ags/engine/ac/character.cpp
+++ b/engines/ags/engine/ac/character.cpp
@@ -60,7 +60,6 @@
 #include "ags/engine/main/update.h"
 #include "ags/shared/ac/sprite_cache.h"
 #include "ags/shared/util/string_compat.h"
-#include "ags/lib/std/math.h"
 #include "ags/engine/gfx/graphics_driver.h"
 #include "ags/engine/script/runtime_script_value.h"
 #include "ags/engine/ac/dynobj/cc_character.h"
diff --git a/engines/ags/engine/ac/display.cpp b/engines/ags/engine/ac/display.cpp
index 82ef565fe5d..d4d452cd76e 100644
--- a/engines/ags/engine/ac/display.cpp
+++ b/engines/ags/engine/ac/display.cpp
@@ -21,7 +21,6 @@
 
 #include "common/config-manager.h"
 #include "ags/lib/std/algorithm.h"
-#include "ags/lib/std/math.h"
 #include "ags/engine/ac/display.h"
 #include "ags/shared/ac/common.h"
 #include "ags/shared/font/ags_font_renderer.h"
diff --git a/engines/ags/engine/ac/dynamic_sprite.cpp b/engines/ags/engine/ac/dynamic_sprite.cpp
index 57ee411f58b..43d4aa70541 100644
--- a/engines/ags/engine/ac/dynamic_sprite.cpp
+++ b/engines/ags/engine/ac/dynamic_sprite.cpp
@@ -19,7 +19,6 @@
  *
  */
 
-#include "ags/lib/std/math.h"
 #include "ags/engine/ac/dynamic_sprite.h"
 #include "ags/shared/ac/common.h"
 #include "ags/engine/ac/draw.h"
diff --git a/engines/ags/engine/ac/global_game.cpp b/engines/ags/engine/ac/global_game.cpp
index def0412c4cf..ce85168a6c1 100644
--- a/engines/ags/engine/ac/global_game.cpp
+++ b/engines/ags/engine/ac/global_game.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "common/savefile.h"
-#include "ags/lib/std/math.h"
 #include "ags/shared/core/platform.h"
 #include "ags/shared/ac/audio_clip_type.h"
 #include "ags/engine/ac/global_game.h"
diff --git a/engines/ags/engine/ac/route_finder_impl_legacy.cpp b/engines/ags/engine/ac/route_finder_impl_legacy.cpp
index bbd4ca54d96..f0073f87050 100644
--- a/engines/ags/engine/ac/route_finder_impl_legacy.cpp
+++ b/engines/ags/engine/ac/route_finder_impl_legacy.cpp
@@ -27,7 +27,6 @@
 //=============================================================================
 
 #include "ags/engine/ac/route_finder_impl_legacy.h"
-#include "ags/lib/std/math.h"
 
 #include "ags/shared/ac/common.h"   // quit()
 #include "ags/shared/ac/common_defines.h"
diff --git a/engines/ags/engine/ac/route_finder_jps.cpp b/engines/ags/engine/ac/route_finder_jps.cpp
index f403e360b60..2e406e14ab9 100644
--- a/engines/ags/engine/ac/route_finder_jps.cpp
+++ b/engines/ags/engine/ac/route_finder_jps.cpp
@@ -30,7 +30,6 @@
 #include "ags/lib/std/vector.h"
 #include "ags/lib/std/algorithm.h"
 #include "ags/lib/std/functional.h"
-#include "ags/lib/std/math.h"
 #include "ags/lib/std/xutility.h"
 
 namespace AGS3 {
diff --git a/engines/ags/engine/main/update.cpp b/engines/ags/engine/main/update.cpp
index 3db3dfd1390..33e1014ab6f 100644
--- a/engines/ags/engine/main/update.cpp
+++ b/engines/ags/engine/main/update.cpp
@@ -23,7 +23,6 @@
 // Game update procedure
 //
 
-#include "ags/lib/std/math.h"
 #include "ags/shared/ac/common.h"
 #include "ags/engine/ac/character.h"
 #include "ags/engine/ac/character_extras.h"
diff --git a/engines/ags/lib/std/std.cpp b/engines/ags/lib/std/std.cpp
index b0f1a1ab5fe..c06cc722fe0 100644
--- a/engines/ags/lib/std/std.cpp
+++ b/engines/ags/lib/std/std.cpp
@@ -29,7 +29,6 @@
 #include "ags/lib/std/limits.h"
 #include "ags/lib/std/list.h"
 #include "ags/lib/std/map.h"
-#include "ags/lib/std/math.h"
 #include "ags/lib/std/memory.h"
 #include "ags/lib/std/mutex.h"
 #include "ags/lib/std/queue.h"
diff --git a/engines/ags/shared/gui/gui_inv.cpp b/engines/ags/shared/gui/gui_inv.cpp
index ef387aa61d7..922fa6b065a 100644
--- a/engines/ags/shared/gui/gui_inv.cpp
+++ b/engines/ags/shared/gui/gui_inv.cpp
@@ -19,7 +19,6 @@
  *
  */
 
-#include "ags/lib/std/math.h"
 #include "ags/shared/ac/game_version.h"
 #include "ags/shared/gui/gui_inv.h"
 #include "ags/shared/gui/gui_main.h"


Commit: 22dae3061e00e1cdb7428f271bebde7ebca13616
    https://github.com/scummvm/scummvm/commit/22dae3061e00e1cdb7428f271bebde7ebca13616
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-06-06T09:00:36+01:00

Commit Message:
AGS: Use C99 isnan instead of std::isnan

Changed paths:
    engines/ags/engine/ac/draw.cpp


diff --git a/engines/ags/engine/ac/draw.cpp b/engines/ags/engine/ac/draw.cpp
index 83733d9ab65..2ef276f2473 100644
--- a/engines/ags/engine/ac/draw.cpp
+++ b/engines/ags/engine/ac/draw.cpp
@@ -20,7 +20,6 @@
  */
 
 #include "ags/lib/std/algorithm.h"
-#include "ags/lib/std/math.h"
 #include "ags/lib/aastr-0.1.1/aastr.h"
 #include "ags/shared/core/platform.h"
 #include "ags/shared/ac/common.h"
@@ -1853,7 +1852,7 @@ void draw_fps(const Rect &viewport) {
 
 	char fps_buffer[60];
 	// Don't display fps if we don't have enough information (because loop count was just reset)
-	if (!std::isnan(_G(fps))) {
+	if (!isnan(_G(fps))) {
 		snprintf(fps_buffer, sizeof(fps_buffer), "FPS: %2.1f / %s", _G(fps), base_buffer);
 	} else {
 		snprintf(fps_buffer, sizeof(fps_buffer), "FPS: --.- / %s", base_buffer);


Commit: 449f14317ec31c59d3473bfa06e0c249e08b11b9
    https://github.com/scummvm/scummvm/commit/449f14317ec31c59d3473bfa06e0c249e08b11b9
Author: Thierry Crozat (criezy at scummvm.org)
Date: 2023-06-06T09:03:35+01:00

Commit Message:
AGS: Remove std math wrapper

Changed paths:
  R engines/ags/lib/std/math.h


diff --git a/engines/ags/lib/std/math.h b/engines/ags/lib/std/math.h
deleted file mode 100644
index 5215c788f3c..00000000000
--- a/engines/ags/lib/std/math.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/* ScummVM - Graphic Adventure Engine
- *
- * ScummVM is the legal property of its developers, whose names
- * are too numerous to list here. Please refer to the COPYRIGHT
- * file distributed with this source distribution.
- *
- * This program is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or
- * (at your option) any later version.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with this program.  If not, see <http://www.gnu.org/licenses/>.
- *
- */
-
-#ifndef AGS_STD_MATH_H
-#define AGS_STD_MATH_H
-
-#include "common/scummsys.h"
-
-namespace AGS3 {
-namespace std {
-
-// In scummsys we include <math.h> and not <cmath>
-// Make sure we have isnan in the std namespace.
-template<class T>
-inline bool isnan(T val) {
-	return ::isnan(val);
-}
-
-} // namespace std
-} // namespace AGS3
-
-#endif




More information about the Scummvm-git-logs mailing list