Skip to content

Commit 9380c4f

Browse files
tamlin-mikeXottab-DUTY
authored andcommitted
Use Noncopyable instead of type-specific stuff.
Also some minor formatting cleaning.
1 parent 67804ad commit 9380c4f

File tree

6 files changed

+13
-23
lines changed

6 files changed

+13
-23
lines changed

src/Layers/xrRenderDX10/3DFluid/dx103DFluidManager.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -591,7 +591,7 @@ void dx103DFluidManager::ApplyVorticityConfinement(float timestep)
591591
// );
592592
}
593593

594-
void dx103DFluidManager::ApplyExternalForces(const dx103DFluidData& FluidData, float timestep)
594+
void dx103DFluidManager::ApplyExternalForces(const dx103DFluidData& FluidData, float /*timestep*/)
595595
{
596596
PIX_EVENT(ApplyExternalForces);
597597

@@ -621,7 +621,7 @@ void dx103DFluidManager::ComputeVelocityDivergence(float timestep)
621621
// pRenderTargetShaderViews[RENDER_TARGET_TEMPVECTOR] );
622622
}
623623

624-
void dx103DFluidManager::ComputePressure(float timestep)
624+
void dx103DFluidManager::ComputePressure(float /*timestep*/)
625625
{
626626
PIX_EVENT(ComputePressure);
627627

@@ -693,7 +693,7 @@ void dx103DFluidManager::ComputePressure(float timestep)
693693
// TechniqueJacobi->GetPassByIndex(0)->Apply(0);
694694
}
695695

696-
void dx103DFluidManager::ProjectVelocity(float timestep)
696+
void dx103DFluidManager::ProjectVelocity(float /*timestep*/)
697697
{
698698
PIX_EVENT(ProjectVelocity);
699699

src/xrCore/LocatorAPI.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
//#include "xrCore/Threading/Lock.hpp"
1010
#include "xrCommon/xr_map.h"
1111
#include "xrCommon/predicates.h"
12+
#include "Common/Noncopyable.hpp"
1213

1314
class CStreamReader;
1415
class Lock;
@@ -37,7 +38,7 @@ class FileStatus
3738
operator bool() const { return Exists; }
3839
};
3940

40-
class XRCORE_API CLocatorAPI
41+
class XRCORE_API CLocatorAPI : Noncopyable
4142
{
4243
friend class FS_Path;
4344

@@ -209,10 +210,6 @@ class XRCORE_API CLocatorAPI
209210
void rescan_pathes();
210211
void lock_rescan();
211212
void unlock_rescan();
212-
213-
private:
214-
CLocatorAPI(const CLocatorAPI&) = delete;
215-
void operator=(const CLocatorAPI&) = delete;
216213
};
217214

218215
extern XRCORE_API CLocatorAPI* xr_FS;

src/xrCore/xrMemory_POOL.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@
33
#define xrMemory_POOLh
44
#include "_types.h"
55
#include "xrCommon/inlining_macros.h"
6+
#include "Common/Noncopyable.hpp"
67

78
class xrMemory;
89
class Lock;
910

10-
class MEMPOOL
11+
class MEMPOOL : Noncopyable
1112
{
1213
#ifdef DEBUG_MEMORY_MANAGER
1314
friend class xrMemory;
@@ -25,10 +26,6 @@ class MEMPOOL
2526
void destroy(void*& P);
2627

2728
private:
28-
// noncopyable
29-
MEMPOOL(const MEMPOOL&) = delete;
30-
void operator=(const MEMPOOL&) = delete;
31-
3229
ICF void** access(void* P) { return (void**)((void*)(P)); }
3330
void block_create();
3431

src/xrCore/xrsharedmem.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
//#include "_stl_extensions.h"
66
#include "xrCommon/xr_vector.h"
7+
#include "Common/Noncopyable.hpp"
78

89
// fwd. decl.
910
class Lock;
@@ -56,7 +57,7 @@ IC bool smem_equal(const smem_value* A, u32 dwCRC, u32 dwLength, u8* ptr)
5657
#pragma warning(pop)
5758

5859
//////////////////////////////////////////////////////////////////////////
59-
class XRCORE_API smem_container
60+
class XRCORE_API smem_container : Noncopyable
6061
{
6162

6263
public:
@@ -69,9 +70,6 @@ class XRCORE_API smem_container
6970
u32 stat_economy();
7071

7172
private:
72-
smem_container(const smem_container&) = delete;
73-
void operator=(const smem_container&) = delete;
74-
7573
typedef xr_vector<smem_value*> cdb;
7674
Lock* pcs;
7775
cdb container;

src/xrGame/ai/stalker/ai_stalker_script_entity.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,13 +36,13 @@ u32 CAI_Stalker::GetWeaponAmmo() const
3636
CInventoryItem* CAI_Stalker::GetMedikit() const
3737
{
3838
#pragma todo("Dima to Dima : Return correct medikit")
39-
return (0);
39+
return 0;
4040
}
4141

4242
CInventoryItem* CAI_Stalker::GetFood() const
4343
{
4444
#pragma todo("Dima to Dima : Return correct food")
45-
return (0);
45+
return 0;
4646
}
4747

4848
void CAI_Stalker::ResetScriptData(void* P) { inherited::ResetScriptData(P); }

src/xrNetServer/NET_Client.h

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
#include "NET_Common.h"
55
#include "xrCommon/xr_deque.h"
66
#include "xrCommon/xr_vector.h"
7+
#include "Common/Noncopyable.hpp"
78

89
struct ip_address;
910

@@ -47,7 +48,7 @@ class XRNETSERVER_API IPureClient : private MultipacketReciever, private Multipa
4748
friend void sync_thread(void*);
4849

4950
protected:
50-
struct HOST_NODE // deprecated...
51+
struct HOST_NODE : Noncopyable // deprecated...
5152
{
5253
HOST_NODE();
5354
HOST_NODE(const HOST_NODE& rhs);
@@ -57,9 +58,6 @@ class XRNETSERVER_API IPureClient : private MultipacketReciever, private Multipa
5758
DPN_APPLICATION_DESC* pdpAppDesc;
5859
IDirectPlay8Address* pHostAddress;
5960
shared_str dpSessionName;
60-
61-
private:
62-
void operator=(const HOST_NODE&) = delete;
6361
};
6462

6563
GameDescriptionData m_game_description;

0 commit comments

Comments
 (0)