From 46cb1e94294d835c8ab9003b4024c156ac6f021a Mon Sep 17 00:00:00 2001 From: "madmaxoft@gmail.com" Date: Sun, 14 Oct 2012 17:02:06 +0000 Subject: BlockArea: Added const-ness to non-modifying functions, so that a const cBlockArea & can be used. git-svn-id: http://mc-server.googlecode.com/svn/trunk@960 0a769ca7-a7f5-676a-18bf-c427514a06d6 --- source/BlockArea.h | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'source/BlockArea.h') diff --git a/source/BlockArea.h b/source/BlockArea.h index 8d374eaad..0a22274ff 100644 --- a/source/BlockArea.h +++ b/source/BlockArea.h @@ -70,14 +70,14 @@ public: void SetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_BlockSkyLight); // Getters: - BLOCKTYPE GetRelBlockType (int a_RelX, int a_RelY, int a_RelZ); - BLOCKTYPE GetBlockType (int a_BlockX, int a_BlockY, int a_BlockZ); - NIBBLETYPE GetRelBlockMeta (int a_RelX, int a_RelY, int a_RelZ); - NIBBLETYPE GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ); - NIBBLETYPE GetRelBlockLight (int a_RelX, int a_RelY, int a_RelZ); - NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ); - NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ); - NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ); + BLOCKTYPE GetRelBlockType (int a_RelX, int a_RelY, int a_RelZ) const; + BLOCKTYPE GetBlockType (int a_BlockX, int a_BlockY, int a_BlockZ) const; + NIBBLETYPE GetRelBlockMeta (int a_RelX, int a_RelY, int a_RelZ) const; + NIBBLETYPE GetBlockMeta (int a_BlockX, int a_BlockY, int a_BlockZ) const; + NIBBLETYPE GetRelBlockLight (int a_RelX, int a_RelY, int a_RelZ) const; + NIBBLETYPE GetBlockLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; + NIBBLETYPE GetRelBlockSkyLight(int a_RelX, int a_RelY, int a_RelZ) const; + NIBBLETYPE GetBlockSkyLight (int a_BlockX, int a_BlockY, int a_BlockZ) const; int GetSizeX(void) const { return m_SizeX; } int GetSizeY(void) const { return m_SizeY; } @@ -100,7 +100,7 @@ public: NIBBLETYPE * GetBlockLight (void) { return m_BlockLight; } // NOTE: one byte per block! NIBBLETYPE * GetBlockSkyLight(void) { return m_BlockSkyLight; } // NOTE: one byte per block! int GetBlockCount(void) const { return m_SizeX * m_SizeY * m_SizeZ; } - int MakeIndex(int a_RelX, int a_RelY, int a_RelZ); + int MakeIndex(int a_RelX, int a_RelY, int a_RelZ) const; protected: @@ -148,8 +148,8 @@ protected: void SetNibble (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE a_Value, NIBBLETYPE * a_Array); // Basic Getters: - NIBBLETYPE GetRelNibble(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE * a_Array); - NIBBLETYPE GetNibble (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE * a_Array); + NIBBLETYPE GetRelNibble(int a_RelX, int a_RelY, int a_RelZ, NIBBLETYPE * a_Array) const; + NIBBLETYPE GetNibble (int a_BlockX, int a_BlockY, int a_BlockZ, NIBBLETYPE * a_Array) const; // tolua_begin } ; -- cgit v1.2.3