Common: Move NonCopyable to its own header

This commit is contained in:
Lioncash 2015-09-26 16:13:54 -04:00
parent bb927ad738
commit 1d42db2439
18 changed files with 39 additions and 16 deletions

View File

@ -17,6 +17,7 @@
#include <string>
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/NonCopyable.h"
class WaveFileWriter : NonCopyable
{

View File

@ -6,6 +6,7 @@
#include "Common/Common.h"
#include "Common/MemoryUtil.h"
#include "Common/NonCopyable.h"
// Everything that needs to generate code should inherit from this.
// You get memory management for free, plus, you can use all emitter functions without

View File

@ -30,18 +30,6 @@ extern const char *netplay_dolphin_ver;
#define UNUSED
#endif
// An inheritable class to disallow the copy constructor and operator= functions
class NonCopyable
{
protected:
constexpr NonCopyable() = default;
~NonCopyable() = default;
private:
NonCopyable(NonCopyable&) = delete;
NonCopyable& operator=(NonCopyable&) = delete;
};
#if defined _WIN32
// Memory leak checks

View File

@ -106,6 +106,7 @@
<ClInclude Include="MsgHandler.h" />
<ClInclude Include="NandPaths.h" />
<ClInclude Include="Network.h" />
<ClInclude Include="NonCopyable.h" />
<ClInclude Include="PcapFile.h" />
<ClInclude Include="Profiler.h" />
<ClInclude Include="SDCardUtil.h" />

View File

@ -11,6 +11,7 @@
#include <vector>
#include "Common/Common.h"
#include "Common/NonCopyable.h"
#ifdef _WIN32
#include "Common/StringUtil.h"

View File

@ -11,6 +11,7 @@
#include <string>
#include "Common/Common.h"
#include "Common/NonCopyable.h"
#define MAX_MESSAGES 8000
#define MAX_MSGLEN 1024

View File

@ -0,0 +1,17 @@
// Copyright 2015 Dolphin Emulator Project
// Licensed under GPLv2+
// Refer to the license.txt file included.
#pragma once
// An inheritable class to disallow the copy constructor and operator= functions
class NonCopyable
{
protected:
constexpr NonCopyable() = default;
~NonCopyable() = default;
private:
NonCopyable(NonCopyable&) = delete;
NonCopyable& operator=(NonCopyable&) = delete;
};

View File

@ -18,6 +18,7 @@
#include "Common/CommonTypes.h"
#include "Common/FileUtil.h"
#include "Common/NonCopyable.h"
class PCAP final : public NonCopyable
{

View File

@ -8,6 +8,7 @@
#include <vector>
#include "Common/IniFile.h"
#include "Common/NonCopyable.h"
#include "Common/SysConf.h"
#include "Core/HW/EXI_Device.h"
#include "Core/HW/SI_Device.h"

View File

@ -7,7 +7,8 @@
#include <memory>
#include <string>
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/NonCopyable.h"
class PCAP;

View File

@ -10,6 +10,7 @@
#include "Common/CommonPaths.h"
#include "Common/CommonTypes.h"
#include "Common/NandPaths.h"
#include "Common/NonCopyable.h"
#include "Common/StringUtil.h"
#include "Core/HW/EXI_DeviceIPL.h"

View File

@ -12,6 +12,7 @@
#include <vector>
#include "Common/Event.h"
#include "Common/NonCopyable.h"
#include "Core/HW/GCMemcard.h"
#include "DiscIO/Volume.h"

View File

@ -8,6 +8,7 @@
#include <memory>
#include "Common/CommonTypes.h"
#include "Common/NonCopyable.h"
// All the templated and very repetitive MMIO-related code is isolated in this
// file for easier reading. It mostly contains code related to handling methods

View File

@ -12,6 +12,7 @@
#include <vector>
#include "Common/FifoQueue.h"
#include "Common/NonCopyable.h"
#include "Common/Timer.h"
#include "Core/HW/Wiimote.h"
#include "Core/HW/WiimoteEmu/WiimoteEmu.h"

View File

@ -47,6 +47,8 @@ typedef struct pollfd pollfd_t;
#include <string>
#include <unordered_map>
#include "Common/CommonTypes.h"
#include "Common/NonCopyable.h"
#include "Core/IPC_HLE/WII_IPC_HLE.h"
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net.h"
#include "Core/IPC_HLE/WII_IPC_HLE_Device_net_ssl.h"

View File

@ -6,8 +6,9 @@
#include <map>
#include "Common/CommonTypes.h"
#include "Common/NonCopyable.h"
#include "Common/GL/GLUtil.h"
#include "VideoBackends/OGL/Render.h"
namespace OGL

View File

@ -4,7 +4,8 @@
#pragma once
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/NonCopyable.h"
#define STATISTICS 1

View File

@ -4,10 +4,12 @@
#pragma once
#include <cstring>
#include <functional> // for hash
#include "Common/Common.h"
#include "Common/CommonTypes.h"
#include "Common/Hash.h"
#include "Common/NonCopyable.h"
// m_components
enum