AGS: Use a namespace alias to keep std namespace as in original code

This commit is contained in:
Le Philousophe 2024-07-08 20:08:11 +02:00
parent d67767ce32
commit 49f0f141d5
6 changed files with 43 additions and 0 deletions

View File

@ -32,6 +32,8 @@
#include "common/std/functional.h"
#include "common/std/xutility.h"
#include "ags/lib/std.h"
namespace AGS3 {
// TODO: this could be cleaned up/simplified ...

View File

@ -26,6 +26,8 @@
#include "common/std/chrono.h"
#include "common/std/xtr1common.h"
#include "ags/lib/std.h"
namespace AGS3 {
// use high resolution clock only if we know it is monotonic/steady.

35
engines/ags/lib/std.h Normal file
View File

@ -0,0 +1,35 @@
/* 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_LIB_STD_H
#define AGS_LIB_STD_H
// Declare Std namespace
namespace Std {
}
// Map Common::Std to AGS3::std
namespace AGS3 {
namespace std = ::Std;
} // namespace AGS3
#endif

View File

@ -29,6 +29,7 @@
#define AGS_SHARED_CORE_TYPES_H
#include "common/scummsys.h"
#include "ags/lib/std.h"
namespace AGS3 {

View File

@ -23,6 +23,7 @@
#define AGS_SHARED_FONT_WFN_FONT_RENDERER_H
#include "common/std/map.h"
#include "ags/lib/std.h"
#include "ags/shared/font/ags_font_renderer.h"
namespace AGS3 {

View File

@ -30,6 +30,8 @@
#include "common/std/limits.h"
#include "ags/lib/std.h"
namespace AGS3 {
#ifndef M_PI