From a33a8dc48761d7cb2b4c1c468e1e3b188bcbf709 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 26 Aug 2012 21:29:59 +0300 Subject: Add const to some classes. --- src/commandhandler.cpp | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'src/commandhandler.cpp') diff --git a/src/commandhandler.cpp b/src/commandhandler.cpp index 502034fe8..12baf0af0 100644 --- a/src/commandhandler.cpp +++ b/src/commandhandler.cpp @@ -78,13 +78,15 @@ CommandHandler::CommandHandler() { } -void CommandHandler::handleCommands(const std::string &command, ChatTab *tab) +void CommandHandler::handleCommands(const std::string &command, + ChatTab *const tab) { // here need add splitting commands handleCommand(command, tab); } -void CommandHandler::handleCommand(const std::string &command, ChatTab *tab) +void CommandHandler::handleCommand(const std::string &command, + ChatTab *const tab) { size_t pos = command.find(' '); std::string type(command, 0, pos); @@ -448,7 +450,7 @@ void CommandHandler::outString(ChatTab *const tab, const std::string &str, { if (!player_node) return; - const Guild *guild = player_node->getGuild(); + const Guild *const guild = player_node->getGuild(); if (guild) { if (guild->getServerGuild()) @@ -814,7 +816,7 @@ void CommandHandler::handleHeal(const std::string &args, if (!args.empty()) { - Being *const being = actorSpriteManager->findBeingByName( + const Being *const being = actorSpriteManager->findBeingByName( args, Being::PLAYER); if (being) actorSpriteManager->heal(being); @@ -864,7 +866,7 @@ void CommandHandler::handleUndress(const std::string &args, if (!actorSpriteManager) return; - Being* target = actorSpriteManager->findNearestByName(args); + Being *const target = actorSpriteManager->findNearestByName(args); if (target) Net::getBeingHandler()->undress(target); } -- cgit v1.2.3-70-g09d2