summaryrefslogtreecommitdiff
path: root/Source/Core/Common/CodeBlock.h
diff options
context:
space:
mode:
authorJosJuice <josjuice@gmail.com>2017-08-22 17:02:50 +0200
committerGitHub <noreply@github.com>2017-08-22 17:02:50 +0200
commit81a4fd9679dcf87d9c11e03100311b44170e84d7 (patch)
tree47c960ebb4556df8ab4886cc98775b1d55cb9125 /Source/Core/Common/CodeBlock.h
parentef4e4a9a76f27877552ef1b18b13a7ec9f9df7ff (diff)
parent09f3f9b41afec593048fc24e452dc074c5eecac7 (diff)
Merge pull request #5884 from JosJuice/remove-noncopyable
Remove NonCopyable
Diffstat (limited to 'Source/Core/Common/CodeBlock.h')
-rw-r--r--Source/Core/Common/CodeBlock.h8
1 files changed, 6 insertions, 2 deletions
diff --git a/Source/Core/Common/CodeBlock.h b/Source/Core/Common/CodeBlock.h
index cd933647ed..9cbe3ffc5b 100644
--- a/Source/Core/Common/CodeBlock.h
+++ b/Source/Core/Common/CodeBlock.h
@@ -10,7 +10,6 @@
#include "Common/Assert.h"
#include "Common/CommonTypes.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
@@ -18,7 +17,7 @@
// Example implementation:
// class JIT : public CodeBlock<ARMXEmitter> {}
template <class T>
-class CodeBlock : public T, NonCopyable
+class CodeBlock : public T
{
private:
// A privately used function to set the executable RAM space to something invalid.
@@ -37,11 +36,16 @@ protected:
std::vector<CodeBlock*> m_children;
public:
+ CodeBlock() = default;
virtual ~CodeBlock()
{
if (region)
FreeCodeSpace();
}
+ CodeBlock(const CodeBlock&) = delete;
+ CodeBlock& operator=(const CodeBlock&) = delete;
+ CodeBlock(CodeBlock&&) = delete;
+ CodeBlock& operator=(CodeBlock&&) = delete;
// Call this before you generate any code.
void AllocCodeSpace(size_t size)