Further C-style struct definitions fixes

This commit is contained in:
void_17
2026-03-02 15:11:05 +07:00
parent def238ff08
commit 09e0c04f7b
3 changed files with 20 additions and 17 deletions

View File

@@ -30,7 +30,8 @@ public:
int compareTo(const TextureHolder *other) const; int compareTo(const TextureHolder *other) const;
}; };
typedef struct struct TextureHolderLessThan
{ {
bool operator() (const TextureHolder *first, const TextureHolder *second) const { return first->compareTo(second) >= 0; } inline bool operator()(const TextureHolder *first, const TextureHolder *second) const
} TextureHolderLessThan; { return first->compareTo(second) >= 0; }
};

View File

@@ -28,13 +28,14 @@ public:
ChunkPos & operator= (const ChunkPos & other) { x = other.x; z = other.z; return *this; } ChunkPos & operator= (const ChunkPos & other) { x = other.x; z = other.z; return *this; }
}; };
typedef struct struct ChunkPosKeyHash
{ {
__int64 operator() (const ChunkPos &k) const { return ChunkPos::hash_fnct(k); } inline __int64 operator()(const ChunkPos &k) const
{ return ChunkPos::hash_fnct(k); }
};
} ChunkPosKeyHash; struct ChunkPosKeyEq
typedef struct
{ {
bool operator() (const ChunkPos &x, const ChunkPos &y) const { return ChunkPos::eq_test(x, y); } inline bool operator()(const ChunkPos &x, const ChunkPos &y) const
} ChunkPosKeyEq; { return ChunkPos::eq_test(x, y); }
};

View File

@@ -14,14 +14,15 @@ public:
static bool eq_test(const TilePos &x, const TilePos &y); static bool eq_test(const TilePos &x, const TilePos &y);
}; };
typedef struct struct TilePosKeyHash
{ {
int operator() (const TilePos &k) const { return TilePos::hash_fnct (k); } inline int operator()(const TilePos &k) const
{ return TilePos::hash_fnct (k); }
};
} TilePosKeyHash; struct TilePosKeyEq
typedef struct
{ {
bool operator() (const TilePos &x, const TilePos &y) const { return TilePos::eq_test (x, y); } inline bool operator()(const TilePos &x, const TilePos &y) const
} TilePosKeyEq; { return TilePos::eq_test (x, y); }
};