From 27f95454a9114cad0f199552612ab67ddfe8b5ca Mon Sep 17 00:00:00 2001 From: Howaner Date: Tue, 6 May 2014 17:31:02 +0200 Subject: [PATCH] Simplified the HandleAnvilItemName() code. --- src/ClientHandle.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/ClientHandle.cpp b/src/ClientHandle.cpp index b8e61a768..94f031ed6 100644 --- a/src/ClientHandle.cpp +++ b/src/ClientHandle.cpp @@ -790,15 +790,10 @@ void cClientHandle::HandleAnvilItemName(const char * a_Data, size_t a_Length) return; } - cByteBuffer Buffer(a_Length); - Buffer.Write(a_Data, a_Length); - - AString Name; - Buffer.ReadAll(Name); - + AString Name(a_Data, a_Length); if (Name.length() <= 30) { - ((cAnvilWindow&)*m_Player->GetWindow()).SetRepairedItemName(Name, m_Player); + ((cAnvilWindow *)m_Player->GetWindow())->SetRepairedItemName(Name, m_Player); } }