Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(199)

Unified Diff: mojo/public/c/system/types.h

Issue 1059543002: Make MojoResults positive. (Closed) Base URL: https://github.com/domokit/mojo.git@master
Patch Set: Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: mojo/public/c/system/types.h
diff --git a/mojo/public/c/system/types.h b/mojo/public/c/system/types.h
index 9f85fbbc2a35e5eda3ba9d942f491e001e31fff7..efe01fc5ec8abea71fd109f9e694c1979dafc0db 100644
--- a/mojo/public/c/system/types.h
+++ b/mojo/public/c/system/types.h
@@ -93,42 +93,42 @@ typedef int32_t MojoResult;
#ifdef __cplusplus
const MojoResult MOJO_RESULT_OK = 0;
-const MojoResult MOJO_RESULT_CANCELLED = -1;
-const MojoResult MOJO_RESULT_UNKNOWN = -2;
-const MojoResult MOJO_RESULT_INVALID_ARGUMENT = -3;
-const MojoResult MOJO_RESULT_DEADLINE_EXCEEDED = -4;
-const MojoResult MOJO_RESULT_NOT_FOUND = -5;
-const MojoResult MOJO_RESULT_ALREADY_EXISTS = -6;
-const MojoResult MOJO_RESULT_PERMISSION_DENIED = -7;
-const MojoResult MOJO_RESULT_RESOURCE_EXHAUSTED = -8;
-const MojoResult MOJO_RESULT_FAILED_PRECONDITION = -9;
-const MojoResult MOJO_RESULT_ABORTED = -10;
-const MojoResult MOJO_RESULT_OUT_OF_RANGE = -11;
-const MojoResult MOJO_RESULT_UNIMPLEMENTED = -12;
-const MojoResult MOJO_RESULT_INTERNAL = -13;
-const MojoResult MOJO_RESULT_UNAVAILABLE = -14;
-const MojoResult MOJO_RESULT_DATA_LOSS = -15;
-const MojoResult MOJO_RESULT_BUSY = -16;
-const MojoResult MOJO_RESULT_SHOULD_WAIT = -17;
+const MojoResult MOJO_RESULT_CANCELLED = 1;
+const MojoResult MOJO_RESULT_UNKNOWN = 2;
+const MojoResult MOJO_RESULT_INVALID_ARGUMENT = 3;
+const MojoResult MOJO_RESULT_DEADLINE_EXCEEDED = 4;
+const MojoResult MOJO_RESULT_NOT_FOUND = 5;
+const MojoResult MOJO_RESULT_ALREADY_EXISTS = 6;
+const MojoResult MOJO_RESULT_PERMISSION_DENIED = 7;
+const MojoResult MOJO_RESULT_RESOURCE_EXHAUSTED = 8;
+const MojoResult MOJO_RESULT_FAILED_PRECONDITION = 9;
+const MojoResult MOJO_RESULT_ABORTED = 10;
+const MojoResult MOJO_RESULT_OUT_OF_RANGE = 11;
+const MojoResult MOJO_RESULT_UNIMPLEMENTED = 12;
+const MojoResult MOJO_RESULT_INTERNAL = 13;
+const MojoResult MOJO_RESULT_UNAVAILABLE = 14;
+const MojoResult MOJO_RESULT_DATA_LOSS = 15;
+const MojoResult MOJO_RESULT_BUSY = 16;
+const MojoResult MOJO_RESULT_SHOULD_WAIT = 17;
#else
#define MOJO_RESULT_OK ((MojoResult)0)
-#define MOJO_RESULT_CANCELLED ((MojoResult) - 1)
-#define MOJO_RESULT_UNKNOWN ((MojoResult) - 2)
-#define MOJO_RESULT_INVALID_ARGUMENT ((MojoResult) - 3)
-#define MOJO_RESULT_DEADLINE_EXCEEDED ((MojoResult) - 4)
-#define MOJO_RESULT_NOT_FOUND ((MojoResult) - 5)
-#define MOJO_RESULT_ALREADY_EXISTS ((MojoResult) - 6)
-#define MOJO_RESULT_PERMISSION_DENIED ((MojoResult) - 7)
-#define MOJO_RESULT_RESOURCE_EXHAUSTED ((MojoResult) - 8)
-#define MOJO_RESULT_FAILED_PRECONDITION ((MojoResult) - 9)
-#define MOJO_RESULT_ABORTED ((MojoResult) - 10)
-#define MOJO_RESULT_OUT_OF_RANGE ((MojoResult) - 11)
-#define MOJO_RESULT_UNIMPLEMENTED ((MojoResult) - 12)
-#define MOJO_RESULT_INTERNAL ((MojoResult) - 13)
-#define MOJO_RESULT_UNAVAILABLE ((MojoResult) - 14)
-#define MOJO_RESULT_DATA_LOSS ((MojoResult) - 15)
-#define MOJO_RESULT_BUSY ((MojoResult) - 16)
-#define MOJO_RESULT_SHOULD_WAIT ((MojoResult) - 17)
+#define MOJO_RESULT_CANCELLED ((MojoResult)1)
+#define MOJO_RESULT_UNKNOWN ((MojoResult)2)
+#define MOJO_RESULT_INVALID_ARGUMENT ((MojoResult)3)
+#define MOJO_RESULT_DEADLINE_EXCEEDED ((MojoResult)4)
+#define MOJO_RESULT_NOT_FOUND ((MojoResult)5)
+#define MOJO_RESULT_ALREADY_EXISTS ((MojoResult)6)
+#define MOJO_RESULT_PERMISSION_DENIED ((MojoResult)7)
+#define MOJO_RESULT_RESOURCE_EXHAUSTED ((MojoResult)8)
+#define MOJO_RESULT_FAILED_PRECONDITION ((MojoResult)9)
+#define MOJO_RESULT_ABORTED ((MojoResult)10)
+#define MOJO_RESULT_OUT_OF_RANGE ((MojoResult)11)
+#define MOJO_RESULT_UNIMPLEMENTED ((MojoResult)12)
+#define MOJO_RESULT_INTERNAL ((MojoResult)13)
+#define MOJO_RESULT_UNAVAILABLE ((MojoResult)14)
+#define MOJO_RESULT_DATA_LOSS ((MojoResult)15)
+#define MOJO_RESULT_BUSY ((MojoResult)16)
+#define MOJO_RESULT_SHOULD_WAIT ((MojoResult)17)
#endif
// |MojoDeadline|: Used to specify deadlines (timeouts), in microseconds (except
« no previous file with comments | « no previous file | mojo/public/dart/src/handle_watcher.dart » ('j') | mojo/services/network/public/interfaces/BUILD.gn » ('J')

Powered by Google App Engine
This is Rietveld 408576698