diff options
author | Remko Tronçon <git@el-tramo.be> | 2010-09-12 07:35:36 (GMT) |
---|---|---|
committer | Remko Tronçon <git@el-tramo.be> | 2010-09-12 07:35:36 (GMT) |
commit | 88a6da65a7b941191ce3836009af9a0d68b89f77 (patch) | |
tree | c85785b2ad6f85d9a0a73b8561fcc503f95f4422 /Swiften/Avatars | |
parent | bc0a8acd15c51fde06fd59dc7eb324287d93d32f (diff) | |
download | swift-contrib-88a6da65a7b941191ce3836009af9a0d68b89f77.zip swift-contrib-88a6da65a7b941191ce3836009af9a0d68b89f77.tar.bz2 |
Make signal disconnect in CombinedAvatarProvider portable.
Diffstat (limited to 'Swiften/Avatars')
-rw-r--r-- | Swiften/Avatars/CombinedAvatarProvider.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Swiften/Avatars/CombinedAvatarProvider.cpp b/Swiften/Avatars/CombinedAvatarProvider.cpp index 0e4a704..4f0b04a 100644 --- a/Swiften/Avatars/CombinedAvatarProvider.cpp +++ b/Swiften/Avatars/CombinedAvatarProvider.cpp @@ -22,14 +22,14 @@ String CombinedAvatarProvider::getAvatarHash(const JID& jid) const { } void CombinedAvatarProvider::addProvider(AvatarProvider* provider) { - provider->onAvatarChanged.connect(reinterpret_cast<int>(this), boost::bind(&CombinedAvatarProvider::handleAvatarChanged, this, _1)); + provider->onAvatarChanged.connect(boost::bind(&CombinedAvatarProvider::handleAvatarChanged, this, _1)); providers.push_back(provider); } void CombinedAvatarProvider::removeProvider(AvatarProvider* provider) { std::vector<AvatarProvider*>::iterator i = std::remove(providers.begin(), providers.end(), provider); for(std::vector<AvatarProvider*>::iterator j = i; j < providers.end(); ++j) { - provider->onAvatarChanged.disconnect(reinterpret_cast<int>(this)); + provider->onAvatarChanged.disconnect(boost::bind(&CombinedAvatarProvider::handleAvatarChanged, this, _1)); } providers.erase(i, providers.end()); } |