From d64cf8b24d1db3bd7e2cb5856ab03c283c015450 Mon Sep 17 00:00:00 2001 From: yasuaki640 Date: Fri, 26 Aug 2022 18:41:36 +0900 Subject: [PATCH] Unify the way enum is defined with simpler typedef --- _parts/part9.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/_parts/part9.md b/_parts/part9.md index cf1be57..58265ce 100644 --- a/_parts/part9.md +++ b/_parts/part9.md @@ -136,12 +136,12 @@ We also need to initialize node type. Lastly, we need to make and handle a new error code. ```diff --enum ExecuteResult_t { EXECUTE_SUCCESS, EXECUTE_TABLE_FULL }; -+enum ExecuteResult_t { +-typedef enum { EXECUTE_SUCCESS, EXECUTE_TABLE_FULL } ExecuteResult; ++typedef enum { + EXECUTE_SUCCESS, + EXECUTE_DUPLICATE_KEY, + EXECUTE_TABLE_FULL -+}; ++} ExecuteResult; ``` ```diff