summaryrefslogtreecommitdiffstats
path: root/source/cChestEntity.cpp
diff options
context:
space:
mode:
authormadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-06 22:10:16 +0200
committermadmaxoft@gmail.com <madmaxoft@gmail.com@0a769ca7-a7f5-676a-18bf-c427514a06d6>2012-08-06 22:10:16 +0200
commite8366993ce3f1cc0c2c6cde1d133773d1f23c474 (patch)
tree789fd452065ff6aa68f2ceac5664959bdb24afc0 /source/cChestEntity.cpp
parentAdded the Doxygen configuration file (diff)
downloadcuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.gz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.bz2
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.lz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.xz
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.tar.zst
cuberite-e8366993ce3f1cc0c2c6cde1d133773d1f23c474.zip
Diffstat (limited to '')
-rw-r--r--source/cChestEntity.cpp14
1 files changed, 6 insertions, 8 deletions
diff --git a/source/cChestEntity.cpp b/source/cChestEntity.cpp
index d2cc168b0..4a46167c0 100644
--- a/source/cChestEntity.cpp
+++ b/source/cChestEntity.cpp
@@ -157,8 +157,8 @@ void cChestEntity::SaveToJson( Json::Value& a_Value )
void cChestEntity::SendTo( cClientHandle* a_Client, cServer* a_Server )
{
- (void)a_Client;
- (void)a_Server;
+ UNUSED(a_Client);
+ UNUSED(a_Server);
return;
}
@@ -166,14 +166,12 @@ void cChestEntity::SendTo( cClientHandle* a_Client, cServer* a_Server )
-void cChestEntity::UsedBy( cPlayer * a_Player )
+void cChestEntity::UsedBy(cPlayer * a_Player)
{
- if( !GetWindow() )
+ if (!GetWindow())
{
- cWindow* Window = new cWindow( this, true );
- Window->SetSlots( GetContents(), GetChestHeight()*c_ChestWidth );
- Window->SetWindowID( 1 );
- Window->SetWindowType( cWindow::Chest );
+ cWindow * Window = new cWindow(this, true, cWindow::Chest, 1);
+ Window->SetSlots(GetContents(), GetChestHeight() * c_ChestWidth);
Window->SetWindowTitle("UberChest");
Window->GetOwner()->SetEntity(this);
OpenWindow( Window );