diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-09-02 14:05:30 +0300 |
commit | 962f182fcc989ec587282e44f889188ce241ba31 (patch) | |
tree | da100971ec4952d0c56cb404862099c670bcfe0e /src/mumblemanager.cpp | |
parent | 4df121e6dcdf53436f50ce81dd60096ce0138a2c (diff) | |
download | manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.gz manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.bz2 manaplus-962f182fcc989ec587282e44f889188ce241ba31.tar.xz manaplus-962f182fcc989ec587282e44f889188ce241ba31.zip |
Add const to more classes.
Diffstat (limited to 'src/mumblemanager.cpp')
-rw-r--r-- | src/mumblemanager.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/mumblemanager.cpp b/src/mumblemanager.cpp index 424bf5c98..e26f67734 100644 --- a/src/mumblemanager.cpp +++ b/src/mumblemanager.cpp @@ -54,7 +54,7 @@ MumbleManager::~MumbleManager() } } -uint16_t MumbleManager::getMapId(std::string mapName) +uint16_t MumbleManager::getMapId(std::string mapName) const { uint16_t res = 0; if (mapName.size() != 5 || mapName[3] != '-') @@ -111,7 +111,7 @@ void MumbleManager::init() char memName[256]; snprintf(memName, 256, "/MumbleLink.%u", getuid()); - int shmfd = shm_open(memName, O_RDWR, S_IRUSR | S_IWUSR); + const int shmfd = shm_open(memName, O_RDWR, S_IRUSR | S_IWUSR); if (shmfd < 0) { @@ -177,7 +177,7 @@ void MumbleManager::setPlayer(const std::string &userName) memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache)); } -void MumbleManager::setAction(int action) +void MumbleManager::setAction(const int action) { if (!mLinkedMem) return; @@ -205,7 +205,8 @@ void MumbleManager::setAction(int action) memcpy(mLinkedMem, &mLinkedMemCache, sizeof(mLinkedMemCache)); } -void MumbleManager::setPos(int tileX, int tileY, int direction) +void MumbleManager::setPos(const int tileX, const int tileY, + const int direction) { if (!mLinkedMem) return; |