浏览代码

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

Andreas Kling 5 年之前
父节点
当前提交
08cfcb888c
共有 1 个文件被更改,包括 1 次插入0 次删除
  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(); }