diff options
author | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-29 20:19:14 +0100 |
---|---|---|
committer | Tiger Wang <ziwei.tiger@hotmail.co.uk> | 2014-01-29 20:19:14 +0100 |
commit | ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8 (patch) | |
tree | 2ca44bb44d1631c35617557fd8746b882f34b688 /src/ChunkDef.h | |
parent | Merge pull request #599 from tonibm19/master (diff) | |
download | cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar.gz cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar.bz2 cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar.lz cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar.xz cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.tar.zst cuberite-ed7816419d2b1d2ddd3a371efb4276ca67dfb4d8.zip |
Diffstat (limited to '')
-rw-r--r-- | src/ChunkDef.h | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/src/ChunkDef.h b/src/ChunkDef.h index d1288994c..13933e6f1 100644 --- a/src/ChunkDef.h +++ b/src/ChunkDef.h @@ -499,13 +499,14 @@ public: /// Generic template that can store any kind of data together with a triplet of 3 coords: -template <typename X> class cCoordWithData +template <typename X, typename Y> class cCoordWithData { public: int x; int y; int z; X Data; + Y SecondData; cCoordWithData(int a_X, int a_Y, int a_Z) : x(a_X), y(a_Y), z(a_Z) @@ -516,14 +517,19 @@ public: x(a_X), y(a_Y), z(a_Z), Data(a_Data) { } + + cCoordWithData(int a_X, int a_Y, int a_Z, const X & a_Data, const Y & a_SecondData) : + x(a_X), y(a_Y), z(a_Z), Data(a_Data), SecondData(a_SecondData) + { + } } ; -// Illegal in C++03: typedef std::list< cCoordWithData<X> > cCoordWithDataList<X>; -typedef cCoordWithData<int> cCoordWithInt; -typedef cCoordWithData<BLOCKTYPE> cCoordWithBlock; +typedef cCoordWithData<int, void *> cCoordWithInt; +typedef cCoordWithData<BLOCKTYPE, bool> cCoordWithBlockAndBool; + typedef std::list<cCoordWithInt> cCoordWithIntList; typedef std::vector<cCoordWithInt> cCoordWithIntVector; -typedef std::vector<cCoordWithBlock> cCoordWithBlockVector; +typedef std::vector<cCoordWithBlockAndBool> cCoordWithBlockAndBoolVector; |