Selaa lähdekoodia

Kernel: Add KResult::error() to make it look symmetrical with KResultOr

Andreas Kling 5 vuotta sitten
vanhempi
commit
08cfcb888c
1 muutettua tiedostoa jossa 1 lisäystä ja 0 poistoa
  1. 1 0
      Kernel/KResult.h

+ 1 - 0
Kernel/KResult.h

@@ -19,6 +19,7 @@ public:
     {
     {
     }
     }
     operator int() const { return m_error; }
     operator int() const { return m_error; }
+    int error() const { return m_error; }
 
 
     bool is_success() const { return m_error == ESUCCESS; }
     bool is_success() const { return m_error == ESUCCESS; }
     bool is_error() const { return !is_success(); }
     bool is_error() const { return !is_success(); }