From 7725256f649719dcce2c50ea84e79d6199dd9a50 Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sat, 31 Jan 2015 22:56:59 -0200 Subject: Explicitly instantiate constructors/destructors for Kernel objects This should speed up compile times a bit, as well as enable more liberal use of forward declarations. (Due to SharedPtr not trying to emit the destructor anymore.) --- src/core/hle/kernel/event.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/core/hle/kernel/event.cpp') diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index d9ad40c6a..3796fbb74 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -14,6 +14,9 @@ namespace Kernel { +Event::Event() {} +Event::~Event() {} + ResultVal> Event::Create(ResetType reset_type, std::string name) { SharedPtr evt(new Event); // TOOD(yuriks): Don't create Handle (see Thread::Create()) -- cgit v1.2.3 From 88a4a808c688eeabb136e9b45223a0e9c95896bc Mon Sep 17 00:00:00 2001 From: Yuri Kunde Schlesner Date: Sun, 1 Feb 2015 00:14:40 -0200 Subject: Kernel: Stop creating useless Handles during object creation They're finally unnecessary, and will stop cluttering the application's handle table. --- src/core/hle/kernel/event.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src/core/hle/kernel/event.cpp') diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 3796fbb74..898e1c98f 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp @@ -17,16 +17,14 @@ namespace Kernel { Event::Event() {} Event::~Event() {} -ResultVal> Event::Create(ResetType reset_type, std::string name) { +SharedPtr Event::Create(ResetType reset_type, std::string name) { SharedPtr evt(new Event); - // TOOD(yuriks): Don't create Handle (see Thread::Create()) - CASCADE_RESULT(auto unused, Kernel::g_handle_table.Create(evt)); evt->signaled = false; evt->reset_type = evt->intitial_reset_type = reset_type; evt->name = std::move(name); - return MakeResult>(evt); + return evt; } bool Event::ShouldWait() { -- cgit v1.2.3