ICB: Replace PreventClassCopy with Common::NonCopyable

This commit is contained in:
Cameron Cawley 2021-02-26 15:00:43 +00:00 committed by Paweł Kołodziejski
parent 5901737aa7
commit 8eb1cecf53
68 changed files with 2 additions and 123 deletions

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/p4.h"
#include "engines/icb/p4_generic.h"

View File

@ -28,8 +28,6 @@
#ifndef ICB_ACTOR_VIEW_PC_H_INCLUDED
#define ICB_ACTOR_VIEW_PC_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
namespace ICB {
// Set this to true if the actor view (character profiles) should act as voxview

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/global_switches.h"
#include "engines/icb/session.h"
#include "engines/icb/animation_mega_set.h"

View File

@ -29,7 +29,6 @@
#define ICB_ANIMATION_MEGA_SET
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_rccommon.h"
namespace ICB {

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/session.h"
#include "engines/icb/actor.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"

View File

@ -25,8 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#if !defined(_PSX_ON_PC)
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/res_man_pc.h"
#include "engines/icb/debug_pc.h"

View File

@ -28,8 +28,6 @@
#ifndef ICB_CLUSTER_MANAGER_PC_H_INCLUDED
#define ICB_CLUSTER_MANAGER_PC_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
namespace ICB {
// Global cluster controller declaration

View File

@ -28,7 +28,6 @@
#ifndef ICB_PX2DLINE_H_INCLUDED
#define ICB_PX2DLINE_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_array.h"
#include "engines/icb/common/px_2drealpoint.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_PX_2DREALPOINT_H_INCLUDED
#define ICB_PX_2DREALPOINT_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/px_common.h"

View File

@ -29,7 +29,6 @@
#define ICB_PX_3DREALPOINT_H_INCLUDED
// Include the header files needed by this class.
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
namespace ICB {

View File

@ -29,7 +29,6 @@
#define ICB_LIBRARY_CMYACTARRAY
#include <cstring>
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
namespace ICB {

View File

@ -29,7 +29,6 @@
#define ICB_PC_CAPRI_MATHS_H
#include "engines/icb/common/px_capri_maths_pc.h"
#include "engines/icb/common/px_rccommon.h"
namespace ICB {

View File

@ -28,8 +28,6 @@
#ifndef ICB_PX_CAPRI_MATHS_PC_H
#define ICB_PX_CAPRI_MATHS_PC_H
#include "engines/icb/common/px_rccommon.h"
#include "common/util.h"
namespace ICB {

View File

@ -30,7 +30,6 @@
#include "common/scummsys.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
namespace ICB {

View File

@ -28,7 +28,6 @@
#ifndef ICB_PX_EXCEPTION_H
#define ICB_PX_EXCEPTION_H
#include "engines/icb/common/px_rccommon.h" // This should be included in every file before anything else
#include "engines/icb/common/px_string.h"
namespace ICB {

View File

@ -28,7 +28,6 @@
#ifndef ICB_GAME_OBJECT_H
#define ICB_GAME_OBJECT_H
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/px_assert.h"

View File

@ -28,6 +28,7 @@
#ifndef ICB_PXGLOBALVARIABLES
#define ICB_PXGLOBALVARIABLES
#include "common/noncopyable.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/common/px_clu_api.h"
@ -46,7 +47,7 @@ public:
int32 value;
};
class CpxGlobalScriptVariables {
class CpxGlobalScriptVariables : Common::NonCopyable {
private:
CpxVariable m_vars[MAX_global_vars];
@ -83,9 +84,6 @@ public:
uint GetNoItems() { return (m_no_vars); }
const CpxVariable &operator[](uint n) { return (m_vars[n]); } // Return reference to variable itself (const)
private:
PreventClassCopy(CpxGlobalScriptVariables);
};
} // End of namespace ICB

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_string.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_PX_LINKED_DATA_FILE_H
#define ICB_PX_LINKED_DATA_FILE_H
#include "engines/icb/common/px_rccommon.h" // This is required to be included before anything else
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_common.h"

View File

@ -1,44 +0,0 @@
/* ResidualVM - A 3D game interpreter
*
* ResidualVM is the legal property of its developers, whose names
* are too numerous to list here. Please refer to the AUTHORS
* file distributed with this source distribution.
*
* Additional copyright for this file:
* Copyright (C) 1999-2000 Revolution Software Ltd.
* This code is based on source code created by Revolution Software,
* used with permission.
*
* 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 2
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
*/
// All the rest of the definitions want defining just the once
#ifndef ICB_PXCOMMON_H_INCLUDED
#define ICB_PXCOMMON_H_INCLUDED
namespace ICB {
// For certain classes the copy constructor and assignment is not a legal operation
// Make disabling of these features easier
#define PreventClassCopy(classname) \
classname(const classname &) { ThrowMemoryException; } \
void operator=(const classname &) { ThrowMemoryException; }
#define ThrowMemoryException *((volatile char *)NULL) = 0;
} // End of namespace ICB
#endif // #ifndef PXCOMMON_H_INCLUDED

View File

@ -28,8 +28,6 @@
#ifndef ICB_RCUTYPES_H
#define ICB_RCUTYPES_H
#include "engines/icb/common/px_rccommon.h" // This should be included in every file before anything else
#include "common/scummsys.h"
namespace ICB {

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_exception.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/p4.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_GAME_ENGINE_SCRIPTENGINE_H
#define ICB_GAME_ENGINE_SCRIPTENGINE_H
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_game_object.h"
#include "engines/icb/common/px_globalvariables.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_exception.h"
#include "engines/icb/common/px_common.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_PX_STRING_H
#define ICB_PX_STRING_H
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
namespace ICB {

View File

@ -29,7 +29,6 @@
#define ICB_D_DEBUG
#include "engines/icb/p4_generic.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_array.h"
#include "engines/icb/debug_pc.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/p4_generic.h"
#include "engines/icb/direct_input.h"

View File

@ -25,8 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/p4_generic.h"
#include "engines/icb/debug.h"
#include "engines/icb/p4.h"

View File

@ -28,8 +28,6 @@
#ifndef ICB_DINPUTH
#define ICB_DINPUTH
#include "engines/icb/common/px_rccommon.h"
#include "common/keyboard.h"
namespace ICB {

View File

@ -29,7 +29,6 @@
#define ICB_EVENTLIST_H_INCLUDED
#include "engines/icb/string_vest.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/string_vest.h"

View File

@ -29,7 +29,6 @@
#define ICB_EVENTMANAGER_H_INCLUDED
// Include files with relative paths
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/p4.h"

View File

@ -29,7 +29,6 @@
#define ICB_EVENTTIMER_H_INCLUDED
#include "engines/icb/string_vest.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/event_list.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/global_objects.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/mission.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/ptr_util.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"

View File

@ -29,7 +29,6 @@
#define ICB_GAMEVOLUME_H_INCLUDED
#include "engines/icb/p4.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_3drealpoint.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/common/px_linkeddatafile.h"

View File

@ -28,8 +28,6 @@
#ifndef ICB_GAMEOVER_H_INCLUDED
#define ICB_GAMEOVER_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
namespace ICB {
// Defined in main_menu_pc.cpp (PC) and gameover_menu_psx.cpp (PSX)

View File

@ -26,7 +26,6 @@
*/
#include "engines/icb/p4.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_anims.h"
#include "engines/icb/session.h"
#include "engines/icb/animation_mega_set.h"

View File

@ -29,7 +29,6 @@
#define ICB_PSX_PCDEFINES_H
#include "common/types.h"
#include "engines/icb/common/px_rccommon.h"
namespace ICB {

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/global_objects_pc.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/global_switches.h"
namespace ICB {

View File

@ -29,7 +29,6 @@
#define ICB_ICON_LIST_H_INCLUDED
// Include headers needed by this class.
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_clu_api.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_ICON_LIST_MANAGER_H_INCLUDED
#define ICB_ICON_LIST_MANAGER_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/string_vest.h"
#include "engines/icb/p4.h"

View File

@ -29,7 +29,6 @@
#define ICB_ICONMENU_H_INCLUDED
// Include headers needed by this class.
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_common.h"

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/res_man_pc.h"
#include "engines/icb/p4.h"
#include "engines/icb/global_objects.h"

View File

@ -27,7 +27,6 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/global_vars.h"

View File

@ -28,8 +28,6 @@
#ifndef ICB_MISSION_FUNCTIONS_H_INCLUDED
#define ICB_MISSION_FUNCTIONS_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
namespace ICB {
int LoadMission(int m, void *usr);

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/movie_pc.h"
#include "engines/icb/direct_input.h"
#include "engines/icb/sound/music_manager.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_MOVIE_PC_H__
#define ICB_MOVIE_PC_H__
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/bink_stub.h"
#include "engines/icb/global_objects_pc.h"
#include "engines/icb/sound/direct_sound.h"

View File

@ -31,7 +31,6 @@
#include "engines/icb/common/px_common.h"
#include "engines/icb/common/px_game_object.h"
#include "engines/icb/common/px_route_barriers.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_array.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/animation_mega_set.h"

View File

@ -27,7 +27,6 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_time
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/icb.h"
#include "engines/icb/options_manager_pc.h"
#include "engines/icb/movie_pc.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_OPTIONS_MANAGER_PC_H_INCLUDED
#define ICB_OPTIONS_MANAGER_PC_H_INCLUDED
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/p4.h"
#include "engines/icb/global_objects.h"
#include "engines/icb/global_switches.h"

View File

@ -28,7 +28,6 @@
#ifndef ICB_INCLUDED_P4_GENERIC_H
#define ICB_INCLUDED_P4_GENERIC_H
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/p4.h"
#include "engines/icb/p4_generic_pc.h"

View File

@ -29,7 +29,6 @@
#define ICB_REMORA_H_INCLUDED
// Include headers needed by this class.
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_common.h"

View File

@ -32,7 +32,6 @@
#include "engines/icb/debug.h"
#include "engines/icb/string_vest.h"
#include "engines/icb/common/px_clu_api.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_assert.h"
#include "engines/icb/common/px_common.h"

View File

@ -31,7 +31,6 @@
#include "engines/icb/p4.h"
#include "engines/icb/common/px_array.h"
#include "engines/icb/common/px_string.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/common/px_common.h"
#include "engines/icb/common/px_clu_api.h"

View File

@ -26,7 +26,6 @@
*/
#include "engines/icb/p4.h"
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/p4_generic.h"
#include "engines/icb/res_man.h"

View File

@ -27,7 +27,6 @@
#define FORBIDDEN_SYMBOL_EXCEPTION_rand
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/p4_generic.h"
#include "engines/icb/set.h"
#include "engines/icb/global_objects.h"

View File

@ -29,7 +29,6 @@
#define ICB_STAGE_VIEW_H__
#include "engines/icb/common/px_rcutypes.h"
#include "engines/icb/common/px_rccommon.h"
namespace ICB {

View File

@ -25,7 +25,6 @@
*
*/
#include "engines/icb/common/px_rccommon.h"
#include "engines/icb/debug.h"
#include "engines/icb/mission.h"
#include "engines/icb/global_objects.h"