summaryrefslogtreecommitdiff
path: root/src/channelmanager.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
committerAndrei Karas <akaras@inbox.ru>2012-08-25 20:12:27 +0300
commit84e56a88817f7178b4895e2adf863b4d98b42e64 (patch)
tree794e0099ca9f749fb0b6b65b96acdb7ce5e97ef9 /src/channelmanager.cpp
parent4a21e45a63137009a654a212ea7512ecc2846648 (diff)
downloadmv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.gz
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.bz2
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.tar.xz
mv-84e56a88817f7178b4895e2adf863b4d98b42e64.zip
Add const to other classes.
Diffstat (limited to 'src/channelmanager.cpp')
-rw-r--r--src/channelmanager.cpp14
1 files changed, 7 insertions, 7 deletions
diff --git a/src/channelmanager.cpp b/src/channelmanager.cpp
index e4d9601e3..4e95e6e3a 100644
--- a/src/channelmanager.cpp
+++ b/src/channelmanager.cpp
@@ -38,15 +38,15 @@ ChannelManager::~ChannelManager()
mChannels.clear();
}
-Channel *ChannelManager::findById(int id) const
+Channel *ChannelManager::findById(const int id) const
{
Channel *channel = nullptr;
for (std::list<Channel*>::const_iterator itr = mChannels.begin(),
- end = mChannels.end();
+ end = mChannels.end();
itr != end;
++itr)
{
- Channel *c = (*itr);
+ Channel *const c = (*itr);
if (!c)
continue;
if (c->getId() == id)
@@ -64,11 +64,11 @@ Channel *ChannelManager::findByName(const std::string &name) const
if (!name.empty())
{
for (std::list<Channel*>::const_iterator itr = mChannels.begin(),
- end = mChannels.end();
+ end = mChannels.end();
itr != end;
++itr)
{
- Channel *c = (*itr);
+ Channel *const c = (*itr);
if (!c)
continue;
if (c->getName() == name)
@@ -81,12 +81,12 @@ Channel *ChannelManager::findByName(const std::string &name) const
return channel;
}
-void ChannelManager::addChannel(Channel *channel)
+void ChannelManager::addChannel(Channel *const channel)
{
mChannels.push_back(channel);
}
-void ChannelManager::removeChannel(Channel *channel)
+void ChannelManager::removeChannel(Channel *const channel)
{
mChannels.remove(channel);
delete channel;