Explorar o código

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

Andreas Kling %!s(int64=5) %!d(string=hai) anos
pai
achega
08cfcb888c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      Kernel/KResult.h

+ 1 - 0
Kernel/KResult.h

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