mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-24 14:49:42 -06:00
Common: Move NonCopyable to its own header
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
@ -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" />
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <vector>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/NonCopyable.h"
|
||||
|
||||
#ifdef _WIN32
|
||||
#include "Common/StringUtil.h"
|
||||
|
@ -11,6 +11,7 @@
|
||||
#include <string>
|
||||
|
||||
#include "Common/Common.h"
|
||||
#include "Common/NonCopyable.h"
|
||||
|
||||
#define MAX_MESSAGES 8000
|
||||
#define MAX_MSGLEN 1024
|
||||
|
17
Source/Core/Common/NonCopyable.h
Normal file
17
Source/Core/Common/NonCopyable.h
Normal 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;
|
||||
};
|
@ -18,6 +18,7 @@
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
#include "Common/FileUtil.h"
|
||||
#include "Common/NonCopyable.h"
|
||||
|
||||
class PCAP final : public NonCopyable
|
||||
{
|
||||
|
Reference in New Issue
Block a user