From cbec016039b370e5c393befbbebbd439924b39d6 Mon Sep 17 00:00:00 2001 From: Barry Kane Date: Sun, 14 Apr 2024 23:16:10 +0100 Subject: [PATCH] Moved data type enum to own header * source/server/data-type.h (DATATYPE_H): Moved from lists.h. * source/server/lists.h (LISTS_H): Added include statement for data-type.h. --- source/server/data-type.h | 32 ++++++++++++++++++++++++++++++++ source/server/lists.h | 9 +-------- 2 files changed, 33 insertions(+), 8 deletions(-) create mode 100644 source/server/data-type.h diff --git a/source/server/data-type.h b/source/server/data-type.h new file mode 100644 index 0000000..24502cc --- /dev/null +++ b/source/server/data-type.h @@ -0,0 +1,32 @@ +// ========================================= +// | SilverMUD Server - data-type.h | +// | Copyright (C) 2023, Barra Ó Catháin | +// | See end of file for copyright notice. | +// ========================================= +#ifndef DATATYPE_H +#define DATATYPE_H + +enum DataType +{ + AREA, + PLAYER, + CONNECTION +}; + +#endif +// ================================================= +// | End of data-type.h, copyright notice follows. | +// ================================================= + +// This program is free software: you can redistribute it and/or modify +// it under the terms of the GNU Affero General Public License as published by +// the Free Software Foundation, either version 3 of the License, or +// (at your option) any later version. + +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU Affero General Public License for more details. + +// You should have received a copy of the GNU Affero General Public License +// along with this program. If not, see . diff --git a/source/server/lists.h b/source/server/lists.h index 53c978e..e426ad3 100644 --- a/source/server/lists.h +++ b/source/server/lists.h @@ -5,15 +5,9 @@ // ========================================= #ifndef LISTS_H #define LISTS_H +#include "data-type.h" #include -enum DataType -{ - AREA, - PLAYER, - CONNECTION -}; - struct List { size_t itemCount; @@ -58,4 +52,3 @@ bool isPointerInList(void * data, struct List * list); // You should have received a copy of the GNU Affero General Public License // along with this program. If not, see . -