aboutsummaryrefslogtreecommitdiff
path: root/src/objdef.h
diff options
context:
space:
mode:
authorElias Fleckenstein <54945686+EliasFleckenstein03@users.noreply.github.com>2020-11-04 16:44:42 +0100
committerGitHub <noreply@github.com>2020-11-04 16:44:42 +0100
commit5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc (patch)
treec980d614fec4a5495798be3e79e033229062c3cd /src/objdef.h
parent28f6a79706b088c37268a59d90878220dc4ef9c7 (diff)
parent3af10766fd2b58b068e970266724d7eb10e9316b (diff)
downloaddragonfireclient-5d9ae5a91c544fc7fbd475decf47cef7e09ef8fc.tar.xz
Merge branch 'master' into master
Diffstat (limited to 'src/objdef.h')
-rw-r--r--src/objdef.h15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/objdef.h b/src/objdef.h
index e40324a88..7b3ae186f 100644
--- a/src/objdef.h
+++ b/src/objdef.h
@@ -33,7 +33,8 @@ class NodeDefManager;
typedef u32 ObjDefHandle;
-enum ObjDefType {
+enum ObjDefType
+{
OBJDEF_GENERIC,
OBJDEF_BIOME,
OBJDEF_ORE,
@@ -41,7 +42,8 @@ enum ObjDefType {
OBJDEF_SCHEMATIC,
};
-class ObjDef {
+class ObjDef
+{
public:
virtual ~ObjDef() = default;
@@ -67,7 +69,8 @@ protected:
// added/set to. Note that ObjDefs managed by ObjDefManager are NOT refcounted,
// so the same ObjDef instance must not be referenced multiple
// TODO: const correctness for getter methods
-class ObjDefManager {
+class ObjDefManager
+{
public:
ObjDefManager(IGameDef *gamedef, ObjDefType type);
virtual ~ObjDefManager();
@@ -99,11 +102,11 @@ public:
u32 validateHandle(ObjDefHandle handle) const;
static ObjDefHandle createHandle(u32 index, ObjDefType type, u32 uid);
- static bool decodeHandle(ObjDefHandle handle, u32 *index,
- ObjDefType *type, u32 *uid);
+ static bool decodeHandle(
+ ObjDefHandle handle, u32 *index, ObjDefType *type, u32 *uid);
protected:
- ObjDefManager() {};
+ ObjDefManager(){};
// Helper for child classes to implement clone()
void cloneTo(ObjDefManager *mgr) const;