From 3a9398d853caf39778771d4916b0781a8597db42 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 6 Dec 2012 22:05:56 +0300 Subject: Fix compilation warnings. --- src/graphics.cpp | 2 +- src/gui/chatwindow.cpp | 4 ++-- src/touchactions.cpp | 21 ++------------------- src/touchactions.h | 6 ------ src/touchmanager.cpp | 4 ++-- 5 files changed, 7 insertions(+), 30 deletions(-) (limited to 'src') diff --git a/src/graphics.cpp b/src/graphics.cpp index d22975db9..2086981de 100644 --- a/src/graphics.cpp +++ b/src/graphics.cpp @@ -1135,7 +1135,7 @@ void Graphics::fillRectangle(const gcn::Rectangle& rectangle) const unsigned rMask = format->Rmask; const unsigned gMask = format->Gmask; const unsigned bMask = format->Bmask; - const unsigned aMask = format->Amask; +// const unsigned aMask = format->Amask; unsigned rShift = rMask / 0xff; unsigned gShift = gMask / 0xff; unsigned bShift = bMask / 0xff; diff --git a/src/gui/chatwindow.cpp b/src/gui/chatwindow.cpp index c0258eade..638d7f81c 100644 --- a/src/gui/chatwindow.cpp +++ b/src/gui/chatwindow.cpp @@ -1410,7 +1410,7 @@ void ChatWindow::resortChatLog(std::string line, Own own, return; } - const size_t idx2 = line.find(": "); + size_t idx2 = line.find(": "); if (idx2 != std::string::npos) { const size_t idx = line.find(": \302\202"); @@ -1428,7 +1428,7 @@ void ChatWindow::resortChatLog(std::string line, Own own, const size_t idx1 = line.find("@@"); if (idx1 != std::string::npos) { - const size_t idx2 = line.find("|", idx1); + idx2 = line.find("|", idx1); if (idx2 != std::string::npos) { const size_t idx3 = line.find("@@", idx2); diff --git a/src/touchactions.cpp b/src/touchactions.cpp index f0b46a31f..ac3e45699 100644 --- a/src/touchactions.cpp +++ b/src/touchactions.cpp @@ -141,31 +141,14 @@ impHandler0(padUp) moveChar(50, 50); } -impHandler(attackClick) +impHandler0(attackClick) { ActionManager::targetAttack(tempEvent); } -impHandler(attackUp) -{ -} - -impHandler(attackOut) -{ -} - -impHandler(cancelClick) +impHandler0(cancelClick) { ActionManager::stopAttack(tempEvent); if (!player_node->getTarget()) ActionManager::sit(tempEvent); } - -impHandler(cancelUp) -{ -} - -impHandler(cancelOut) -{ -} - diff --git a/src/touchactions.h b/src/touchactions.h index b16768f5e..0f55d46a8 100644 --- a/src/touchactions.h +++ b/src/touchactions.h @@ -34,14 +34,8 @@ decHandler(padClick); decHandler(padEvents); decHandler(padOut); decHandler(padUp); - decHandler(attackClick); -decHandler(attackOut); -decHandler(attackUp); - decHandler(cancelClick); -decHandler(cancelOut); -decHandler(cancelUp); #undef decHandler diff --git a/src/touchmanager.cpp b/src/touchmanager.cpp index 4fc5c57e7..2382e13b4 100644 --- a/src/touchmanager.cpp +++ b/src/touchmanager.cpp @@ -64,9 +64,9 @@ void TouchManager::init() loadTouchItem(&mPad, "dpad.xml", 100, 100, LEFT, &padEvents, &padClick, &padUp, &padOut); loadTouchItem(&mAttack, "dpad_attack.xml", 60, 60, RIGHT, - nullptr, &attackClick, &attackUp, &attackOut); + nullptr, &attackClick, nullptr, nullptr); loadTouchItem(&mCancel, "dpad_cancel.xml", 60, 60, RIGHT, - nullptr, &cancelClick, &cancelUp, &cancelOut); + nullptr, &cancelClick, nullptr, nullptr); } } -- cgit v1.2.3-60-g2f50