Add override
keyword through the code.
This was automated using `clang-modernize`.
This commit is contained in:
parent
da564d3fe0
commit
d72708c1f5
23 changed files with 87 additions and 87 deletions
|
@ -17,11 +17,11 @@ namespace Kernel {
|
|||
|
||||
class AddressArbiter : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "Arbiter"; }
|
||||
std::string GetName() const { return name; }
|
||||
std::string GetTypeName() const override { return "Arbiter"; }
|
||||
std::string GetName() const override { return name; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return HandleType::AddressArbiter; }
|
||||
Kernel::HandleType GetHandleType() const { return HandleType::AddressArbiter; }
|
||||
Kernel::HandleType GetHandleType() const override { return HandleType::AddressArbiter; }
|
||||
|
||||
std::string name; ///< Name of address arbiter object (optional)
|
||||
|
||||
|
@ -30,7 +30,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
|
||||
return 0;
|
||||
|
|
|
@ -42,11 +42,11 @@ enum class DirectoryCommand : u32 {
|
|||
|
||||
class Archive : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "Archive"; }
|
||||
std::string GetName() const { return name; }
|
||||
std::string GetTypeName() const override { return "Archive"; }
|
||||
std::string GetName() const override { return name; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return HandleType::Archive; }
|
||||
Kernel::HandleType GetHandleType() const { return HandleType::Archive; }
|
||||
Kernel::HandleType GetHandleType() const override { return HandleType::Archive; }
|
||||
|
||||
std::string name; ///< Name of archive (optional)
|
||||
FileSys::Archive* backend; ///< Archive backend interface
|
||||
|
@ -56,7 +56,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result SyncRequest(bool* wait) {
|
||||
Result SyncRequest(bool* wait) override {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]);
|
||||
|
||||
|
@ -119,7 +119,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
|
||||
return 0;
|
||||
|
@ -128,11 +128,11 @@ public:
|
|||
|
||||
class File : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "File"; }
|
||||
std::string GetName() const { return path; }
|
||||
std::string GetTypeName() const override { return "File"; }
|
||||
std::string GetName() const override { return path; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return HandleType::File; }
|
||||
Kernel::HandleType GetHandleType() const { return HandleType::File; }
|
||||
Kernel::HandleType GetHandleType() const override { return HandleType::File; }
|
||||
|
||||
std::string path; ///< Path of the file
|
||||
std::unique_ptr<FileSys::File> backend; ///< File backend interface
|
||||
|
@ -142,7 +142,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result SyncRequest(bool* wait) {
|
||||
Result SyncRequest(bool* wait) override {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
FileCommand cmd = static_cast<FileCommand>(cmd_buff[0]);
|
||||
switch (cmd) {
|
||||
|
@ -211,7 +211,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
|
||||
return 0;
|
||||
|
@ -220,11 +220,11 @@ public:
|
|||
|
||||
class Directory : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "Directory"; }
|
||||
std::string GetName() const { return path; }
|
||||
std::string GetTypeName() const override { return "Directory"; }
|
||||
std::string GetName() const override { return path; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return HandleType::Directory; }
|
||||
Kernel::HandleType GetHandleType() const { return HandleType::Directory; }
|
||||
Kernel::HandleType GetHandleType() const override { return HandleType::Directory; }
|
||||
|
||||
std::string path; ///< Path of the directory
|
||||
std::unique_ptr<FileSys::Directory> backend; ///< File backend interface
|
||||
|
@ -234,7 +234,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result SyncRequest(bool* wait) {
|
||||
Result SyncRequest(bool* wait) override {
|
||||
u32* cmd_buff = Service::GetCommandBuffer();
|
||||
DirectoryCommand cmd = static_cast<DirectoryCommand>(cmd_buff[0]);
|
||||
switch (cmd) {
|
||||
|
@ -274,7 +274,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
|
||||
return 0;
|
||||
|
|
|
@ -16,11 +16,11 @@ namespace Kernel {
|
|||
|
||||
class Event : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "Event"; }
|
||||
std::string GetName() const { return name; }
|
||||
std::string GetTypeName() const override { return "Event"; }
|
||||
std::string GetName() const override { return name; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Event; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Event; }
|
||||
Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Event; }
|
||||
|
||||
ResetType intitial_reset_type; ///< ResetType specified at Event initialization
|
||||
ResetType reset_type; ///< Current ResetType
|
||||
|
@ -35,7 +35,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
*wait = locked;
|
||||
if (locked) {
|
||||
Handle thread = GetCurrentThreadHandle();
|
||||
|
|
|
@ -15,11 +15,11 @@ namespace Kernel {
|
|||
|
||||
class Mutex : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "Mutex"; }
|
||||
std::string GetName() const { return name; }
|
||||
std::string GetTypeName() const override { return "Mutex"; }
|
||||
std::string GetName() const override { return name; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Mutex; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Mutex; }
|
||||
Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Mutex; }
|
||||
|
||||
bool initial_locked; ///< Initial lock state when mutex was created
|
||||
bool locked; ///< Current locked state
|
||||
|
@ -32,7 +32,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result SyncRequest(bool* wait) {
|
||||
Result SyncRequest(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
locked = true;
|
||||
return 0;
|
||||
|
@ -43,7 +43,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
*wait = locked;
|
||||
|
||||
|
|
|
@ -11,17 +11,17 @@ namespace Kernel {
|
|||
|
||||
class SharedMemory : public Object {
|
||||
public:
|
||||
std::string GetTypeName() const { return "SharedMemory"; }
|
||||
std::string GetTypeName() const override { return "SharedMemory"; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::SharedMemory; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::SharedMemory; }
|
||||
Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::SharedMemory; }
|
||||
|
||||
/**
|
||||
* Wait for kernel object to synchronize
|
||||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
// TODO(bunnei): ImplementMe
|
||||
ERROR_LOG(OSHLE, "(UNIMPLEMENTED)");
|
||||
return 0;
|
||||
|
|
|
@ -21,11 +21,11 @@ namespace Kernel {
|
|||
class Thread : public Kernel::Object {
|
||||
public:
|
||||
|
||||
std::string GetName() const { return name; }
|
||||
std::string GetTypeName() const { return "Thread"; }
|
||||
std::string GetName() const override { return name; }
|
||||
std::string GetTypeName() const override { return "Thread"; }
|
||||
|
||||
static Kernel::HandleType GetStaticHandleType() { return Kernel::HandleType::Thread; }
|
||||
Kernel::HandleType GetHandleType() const { return Kernel::HandleType::Thread; }
|
||||
Kernel::HandleType GetHandleType() const override { return Kernel::HandleType::Thread; }
|
||||
|
||||
inline bool IsRunning() const { return (status & THREADSTATUS_RUNNING) != 0; }
|
||||
inline bool IsStopped() const { return (status & THREADSTATUS_DORMANT) != 0; }
|
||||
|
@ -38,7 +38,7 @@ public:
|
|||
* @param wait Boolean wait set if current thread should wait as a result of sync operation
|
||||
* @return Result of operation, 0 on success, otherwise error code
|
||||
*/
|
||||
Result WaitSynchronization(bool* wait) {
|
||||
Result WaitSynchronization(bool* wait) override {
|
||||
if (status != THREADSTATUS_DORMANT) {
|
||||
Handle thread = GetCurrentThreadHandle();
|
||||
if (std::find(waiting_threads.begin(), waiting_threads.end(), thread) == waiting_threads.end()) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue