diff options
| author | 2014-10-27 21:23:16 -0400 | |
|---|---|---|
| committer | 2014-10-27 21:23:16 -0400 | |
| commit | 19d91a45f50b95e53369444b4a34758e58e96739 (patch) | |
| tree | 04a99b93c5ed56d4cb9a2579032f5903dba3806b /src/core/hle/kernel | |
| parent | Merge pull request #154 from lioncash/dyncom (diff) | |
| parent | Add `override` keyword through the code. (diff) | |
| download | yuzu-19d91a45f50b95e53369444b4a34758e58e96739.tar.gz yuzu-19d91a45f50b95e53369444b4a34758e58e96739.tar.xz yuzu-19d91a45f50b95e53369444b4a34758e58e96739.zip | |
Merge pull request #153 from yuriks/add-override
Add override keyword where appropriate
Diffstat (limited to 'src/core/hle/kernel')
| -rw-r--r-- | src/core/hle/kernel/address_arbiter.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/archive.cpp | 30 | ||||
| -rw-r--r-- | src/core/hle/kernel/event.cpp | 8 | ||||
| -rw-r--r-- | src/core/hle/kernel/mutex.cpp | 10 | ||||
| -rw-r--r-- | src/core/hle/kernel/shared_memory.cpp | 6 | ||||
| -rw-r--r-- | src/core/hle/kernel/thread.cpp | 8 |
6 files changed, 35 insertions, 35 deletions
diff --git a/src/core/hle/kernel/address_arbiter.cpp b/src/core/hle/kernel/address_arbiter.cpp index 174d4cd6e..2b21657da 100644 --- a/src/core/hle/kernel/address_arbiter.cpp +++ b/src/core/hle/kernel/address_arbiter.cpp | |||
| @@ -17,11 +17,11 @@ namespace Kernel { | |||
| 17 | 17 | ||
| 18 | class AddressArbiter : public Object { | 18 | class AddressArbiter : public Object { |
| 19 | public: | 19 | public: |
| 20 | std::string GetTypeName() const { return "Arbiter"; } | 20 | std::string GetTypeName() const override { return "Arbiter"; } |
| 21 | std::string GetName() const { return name; } | 21 | std::string GetName() const override { return name; } |
| 22 | 22 | ||
| 23 | static Kernel::HandleType GetStaticHandleType() { return HandleType::AddressArbiter; } | 23 | static Kernel::HandleType GetStaticHandleType() { return HandleType::AddressArbiter; } |
| 24 | Kernel::HandleType GetHandleType() const { return HandleType::AddressArbiter; } | 24 | Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; } |
| 25 | 25 | ||
| 26 | std::string name; ///< Name of address arbiter object (optional) | 26 | std::string name; ///< Name of address arbiter object (optional) |
| 27 | 27 | ||
| @@ -30,7 +30,7 @@ public: | |||
| 30 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 30 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 31 | * @return Result of operation, 0 on success, otherwise error code | 31 | * @return Result of operation, 0 on success, otherwise error code |
| 32 | */ | 32 | */ |
| 33 | Result WaitSynchronization(bool* wait) { | 33 | Result WaitSynchronization(bool* wait) override { |
| 34 | // TODO(bunnei): ImplementMe | 34 | // TODO(bunnei): ImplementMe |
| 35 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | 35 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); |
| 36 | return 0; | 36 | return 0; |
diff --git a/src/core/hle/kernel/archive.cpp b/src/core/hle/kernel/archive.cpp index 86aba7489..09b4e75a5 100644 --- a/src/core/hle/kernel/archive.cpp +++ b/src/core/hle/kernel/archive.cpp | |||
| @@ -42,11 +42,11 @@ enum class DirectoryCommand : u32 { | |||
| 42 | 42 | ||
| 43 | class Archive : public Object { | 43 | class Archive : public Object { |
| 44 | public: | 44 | public: |
| 45 | std::string GetTypeName() const { return "Archive"; } | 45 | std::string GetTypeName() const override { return "Archive"; } |
| 46 | std::string GetName() const { return name; } | 46 | std::string GetName() const override { return name; } |
| 47 | 47 | ||
| 48 | static Kernel::HandleType GetStaticHandleType() { return HandleType::Archive; } | 48 | static Kernel::HandleType GetStaticHandleType() { return HandleType::Archive; } |
| 49 | Kernel::HandleType GetHandleType() const { return HandleType::Archive; } | 49 | Kernel::HandleType GetHandleType() const override { return HandleType::Archive; } |
| 50 | 50 | ||
| 51 | std::string name; ///< Name of archive (optional) | 51 | std::string name; ///< Name of archive (optional) |
| 52 | FileSys::Archive* backend; ///< Archive backend interface | 52 | FileSys::Archive* backend; ///< Archive backend interface |
| @@ -56,7 +56,7 @@ public: | |||
| 56 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 56 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 57 | * @return Result of operation, 0 on success, otherwise error code | 57 | * @return Result of operation, 0 on success, otherwise error code |
| 58 | */ | 58 | */ |
| 59 | Result SyncRequest(bool* wait) { | 59 | Result SyncRequest(bool* wait) override { |
| 60 | u32* cmd_buff = Service::GetCommandBuffer(); | 60 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 61 | FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); | 61 | FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); |
| 62 | 62 | ||
| @@ -119,7 +119,7 @@ public: | |||
| 119 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 119 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 120 | * @return Result of operation, 0 on success, otherwise error code | 120 | * @return Result of operation, 0 on success, otherwise error code |
| 121 | */ | 121 | */ |
| 122 | Result WaitSynchronization(bool* wait) { | 122 | Result WaitSynchronization(bool* wait) override { |
| 123 | // TODO(bunnei): ImplementMe | 123 | // TODO(bunnei): ImplementMe |
| 124 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | 124 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); |
| 125 | return 0; | 125 | return 0; |
| @@ -128,11 +128,11 @@ public: | |||
| 128 | 128 | ||
| 129 | class File : public Object { | 129 | class File : public Object { |
| 130 | public: | 130 | public: |
| 131 | std::string GetTypeName() const { return "File"; } | 131 | std::string GetTypeName() const override { return "File"; } |
| 132 | std::string GetName() const { return path; } | 132 | std::string GetName() const override { return path; } |
| 133 | 133 | ||
| 134 | static Kernel::HandleType GetStaticHandleType() { return HandleType::File; } | 134 | static Kernel::HandleType GetStaticHandleType() { return HandleType::File; } |
| 135 | Kernel::HandleType GetHandleType() const { return HandleType::File; } | 135 | Kernel::HandleType GetHandleType() const override { return HandleType::File; } |
| 136 | 136 | ||
| 137 | std::string path; ///< Path of the file | 137 | std::string path; ///< Path of the file |
| 138 | std::unique_ptr<FileSys::File> backend; ///< File backend interface | 138 | std::unique_ptr<FileSys::File> backend; ///< File backend interface |
| @@ -142,7 +142,7 @@ public: | |||
| 142 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 142 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 143 | * @return Result of operation, 0 on success, otherwise error code | 143 | * @return Result of operation, 0 on success, otherwise error code |
| 144 | */ | 144 | */ |
| 145 | Result SyncRequest(bool* wait) { | 145 | Result SyncRequest(bool* wait) override { |
| 146 | u32* cmd_buff = Service::GetCommandBuffer(); | 146 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 147 | FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); | 147 | FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]); |
| 148 | switch (cmd) { | 148 | switch (cmd) { |
| @@ -211,7 +211,7 @@ public: | |||
| 211 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 211 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 212 | * @return Result of operation, 0 on success, otherwise error code | 212 | * @return Result of operation, 0 on success, otherwise error code |
| 213 | */ | 213 | */ |
| 214 | Result WaitSynchronization(bool* wait) { | 214 | Result WaitSynchronization(bool* wait) override { |
| 215 | // TODO(bunnei): ImplementMe | 215 | // TODO(bunnei): ImplementMe |
| 216 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | 216 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); |
| 217 | return 0; | 217 | return 0; |
| @@ -220,11 +220,11 @@ public: | |||
| 220 | 220 | ||
| 221 | class Directory : public Object { | 221 | class Directory : public Object { |
| 222 | public: | 222 | public: |
| 223 | std::string GetTypeName() const { return "Directory"; } | 223 | std::string GetTypeName() const override { return "Directory"; } |
| 224 | std::string GetName() const { return path; } | 224 | std::string GetName() const override { return path; } |
| 225 | 225 | ||
| 226 | static Kernel::HandleType GetStaticHandleType() { return HandleType::Directory; } | 226 | static Kernel::HandleType GetStaticHandleType() { return HandleType::Directory; } |
| 227 | Kernel::HandleType GetHandleType() const { return HandleType::Directory; } | 227 | Kernel::HandleType GetHandleType() const override { return HandleType::Directory; } |
| 228 | 228 | ||
| 229 | std::string path; ///< Path of the directory | 229 | std::string path; ///< Path of the directory |
| 230 | std::unique_ptr<FileSys::Directory> backend; ///< File backend interface | 230 | std::unique_ptr<FileSys::Directory> backend; ///< File backend interface |
| @@ -234,7 +234,7 @@ public: | |||
| 234 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 234 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 235 | * @return Result of operation, 0 on success, otherwise error code | 235 | * @return Result of operation, 0 on success, otherwise error code |
| 236 | */ | 236 | */ |
| 237 | Result SyncRequest(bool* wait) { | 237 | Result SyncRequest(bool* wait) override { |
| 238 | u32* cmd_buff = Service::GetCommandBuffer(); | 238 | u32* cmd_buff = Service::GetCommandBuffer(); |
| 239 | DirectoryCommand cmd = static_cast<DirectoryCommand>(cmd_buff[0]); | 239 | DirectoryCommand cmd = static_cast<DirectoryCommand>(cmd_buff[0]); |
| 240 | switch (cmd) { | 240 | switch (cmd) { |
| @@ -274,7 +274,7 @@ public: | |||
| 274 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 274 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 275 | * @return Result of operation, 0 on success, otherwise error code | 275 | * @return Result of operation, 0 on success, otherwise error code |
| 276 | */ | 276 | */ |
| 277 | Result WaitSynchronization(bool* wait) { | 277 | Result WaitSynchronization(bool* wait) override { |
| 278 | // TODO(bunnei): ImplementMe | 278 | // TODO(bunnei): ImplementMe |
| 279 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | 279 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); |
| 280 | return 0; | 280 | return 0; |
diff --git a/src/core/hle/kernel/event.cpp b/src/core/hle/kernel/event.cpp index 64f6a9649..45ed79be8 100644 --- a/src/core/hle/kernel/event.cpp +++ b/src/core/hle/kernel/event.cpp | |||
| @@ -16,11 +16,11 @@ namespace Kernel { | |||
| 16 | 16 | ||
| 17 | class Event : public Object { | 17 | class Event : public Object { |
| 18 | public: | 18 | public: |
| 19 | std::string GetTypeName() const { return "Event"; } | 19 | std::string GetTypeName() const override { return "Event"; } |
| 20 | std::string GetName() const { return name; } | 20 | std::string GetName() const override { return name; } |
| 21 | 21 | ||
| 22 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; } | 22 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; } |
| 23 | Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Event; } | 23 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Event; } |
| 24 | 24 | ||
| 25 | ResetType intitial_reset_type; ///< ResetType specified at Event initialization | 25 | ResetType intitial_reset_type; ///< ResetType specified at Event initialization |
| 26 | ResetType reset_type; ///< Current ResetType | 26 | ResetType reset_type; ///< Current ResetType |
| @@ -35,7 +35,7 @@ public: | |||
| 35 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 35 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 36 | * @return Result of operation, 0 on success, otherwise error code | 36 | * @return Result of operation, 0 on success, otherwise error code |
| 37 | */ | 37 | */ |
| 38 | Result WaitSynchronization(bool* wait) { | 38 | Result WaitSynchronization(bool* wait) override { |
| 39 | *wait = locked; | 39 | *wait = locked; |
| 40 | if (locked) { | 40 | if (locked) { |
| 41 | Handle thread = GetCurrentThreadHandle(); | 41 | Handle thread = GetCurrentThreadHandle(); |
diff --git a/src/core/hle/kernel/mutex.cpp b/src/core/hle/kernel/mutex.cpp index 5d7d65dd9..fcfd061ac 100644 --- a/src/core/hle/kernel/mutex.cpp +++ b/src/core/hle/kernel/mutex.cpp | |||
| @@ -15,11 +15,11 @@ namespace Kernel { | |||
| 15 | 15 | ||
| 16 | class Mutex : public Object { | 16 | class Mutex : public Object { |
| 17 | public: | 17 | public: |
| 18 | std::string GetTypeName() const { return "Mutex"; } | 18 | std::string GetTypeName() const override { return "Mutex"; } |
| 19 | std::string GetName() const { return name; } | 19 | std::string GetName() const override { return name; } |
| 20 | 20 | ||
| 21 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; } | 21 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; } |
| 22 | Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Mutex; } | 22 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Mutex; } |
| 23 | 23 | ||
| 24 | bool initial_locked; ///< Initial lock state when mutex was created | 24 | bool initial_locked; ///< Initial lock state when mutex was created |
| 25 | bool locked; ///< Current locked state | 25 | bool locked; ///< Current locked state |
| @@ -32,7 +32,7 @@ public: | |||
| 32 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 32 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 33 | * @return Result of operation, 0 on success, otherwise error code | 33 | * @return Result of operation, 0 on success, otherwise error code |
| 34 | */ | 34 | */ |
| 35 | Result SyncRequest(bool* wait) { | 35 | Result SyncRequest(bool* wait) override { |
| 36 | // TODO(bunnei): ImplementMe | 36 | // TODO(bunnei): ImplementMe |
| 37 | locked = true; | 37 | locked = true; |
| 38 | return 0; | 38 | return 0; |
| @@ -43,7 +43,7 @@ public: | |||
| 43 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 43 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 44 | * @return Result of operation, 0 on success, otherwise error code | 44 | * @return Result of operation, 0 on success, otherwise error code |
| 45 | */ | 45 | */ |
| 46 | Result WaitSynchronization(bool* wait) { | 46 | Result WaitSynchronization(bool* wait) override { |
| 47 | // TODO(bunnei): ImplementMe | 47 | // TODO(bunnei): ImplementMe |
| 48 | *wait = locked; | 48 | *wait = locked; |
| 49 | 49 | ||
diff --git a/src/core/hle/kernel/shared_memory.cpp b/src/core/hle/kernel/shared_memory.cpp index 2a6a483a1..6bd5e2728 100644 --- a/src/core/hle/kernel/shared_memory.cpp +++ b/src/core/hle/kernel/shared_memory.cpp | |||
| @@ -11,17 +11,17 @@ namespace Kernel { | |||
| 11 | 11 | ||
| 12 | class SharedMemory : public Object { | 12 | class SharedMemory : public Object { |
| 13 | public: | 13 | public: |
| 14 | std::string GetTypeName() const { return "SharedMemory"; } | 14 | std::string GetTypeName() const override { return "SharedMemory"; } |
| 15 | 15 | ||
| 16 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } | 16 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; } |
| 17 | Kernel::HandleType GetHandleType() const { return Kernel::HandleType::SharedMemory; } | 17 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; } |
| 18 | 18 | ||
| 19 | /** | 19 | /** |
| 20 | * Wait for kernel object to synchronize | 20 | * Wait for kernel object to synchronize |
| 21 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 21 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 22 | * @return Result of operation, 0 on success, otherwise error code | 22 | * @return Result of operation, 0 on success, otherwise error code |
| 23 | */ | 23 | */ |
| 24 | Result WaitSynchronization(bool* wait) { | 24 | Result WaitSynchronization(bool* wait) override { |
| 25 | // TODO(bunnei): ImplementMe | 25 | // TODO(bunnei): ImplementMe |
| 26 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); | 26 | ERROR_LOG(OSHLE, "(UNIMPLEMENTED)"); |
| 27 | return 0; | 27 | return 0; |
diff --git a/src/core/hle/kernel/thread.cpp b/src/core/hle/kernel/thread.cpp index 33c0b2a47..e15590c49 100644 --- a/src/core/hle/kernel/thread.cpp +++ b/src/core/hle/kernel/thread.cpp | |||
| @@ -21,11 +21,11 @@ namespace Kernel { | |||
| 21 | class Thread : public Kernel::Object { | 21 | class Thread : public Kernel::Object { |
| 22 | public: | 22 | public: |
| 23 | 23 | ||
| 24 | std::string GetName() const { return name; } | 24 | std::string GetName() const override { return name; } |
| 25 | std::string GetTypeName() const { return "Thread"; } | 25 | std::string GetTypeName() const override { return "Thread"; } |
| 26 | 26 | ||
| 27 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; } | 27 | static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; } |
| 28 | Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; } | 28 | Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Thread; } |
| 29 | 29 | ||
| 30 | inline bool IsRunning() const { return (status & THREADSTATUS_RUNNING) != 0; } | 30 | inline bool IsRunning() const { return (status & THREADSTATUS_RUNNING) != 0; } |
| 31 | inline bool IsStopped() const { return (status & THREADSTATUS_DORMANT) != 0; } | 31 | inline bool IsStopped() const { return (status & THREADSTATUS_DORMANT) != 0; } |
| @@ -38,7 +38,7 @@ public: | |||
| 38 | * @param wait Boolean wait set if current thread should wait as a result of sync operation | 38 | * @param wait Boolean wait set if current thread should wait as a result of sync operation |
| 39 | * @return Result of operation, 0 on success, otherwise error code | 39 | * @return Result of operation, 0 on success, otherwise error code |
| 40 | */ | 40 | */ |
| 41 | Result WaitSynchronization(bool* wait) { | 41 | Result WaitSynchronization(bool* wait) override { |
| 42 | if (status != THREADSTATUS_DORMANT) { | 42 | if (status != THREADSTATUS_DORMANT) { |
| 43 | Handle thread = GetCurrentThreadHandle(); | 43 | Handle thread = GetCurrentThreadHandle(); |
| 44 | if (std::find(waiting_threads.begin(), waiting_threads.end(), thread) == waiting_threads.end()) { | 44 | if (std::find(waiting_threads.begin(), waiting_threads.end(), thread) == waiting_threads.end()) { |