summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/Avatars/AvatarMemoryStorage.h')
-rw-r--r--Swiften/Avatars/AvatarMemoryStorage.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/Swiften/Avatars/AvatarMemoryStorage.h b/Swiften/Avatars/AvatarMemoryStorage.h
index 6f1ba49..3fa770a 100644
--- a/Swiften/Avatars/AvatarMemoryStorage.h
+++ b/Swiften/Avatars/AvatarMemoryStorage.h
@@ -8,25 +8,25 @@
#include <map>
-#include "Swiften/Base/String.h"
+#include <string>
#include "Swiften/Base/ByteArray.h"
#include "Swiften/Avatars/AvatarStorage.h"
namespace Swift {
class AvatarMemoryStorage : public AvatarStorage {
public:
- virtual bool hasAvatar(const String& hash) const { return avatars.find(hash) != avatars.end(); }
- virtual void addAvatar(const String& hash, const ByteArray& avatar) { avatars[hash] = avatar; }
- virtual ByteArray getAvatar(const String& hash) const {
- std::map<String, ByteArray>::const_iterator i = avatars.find(hash);
+ virtual bool hasAvatar(const std::string& hash) const { return avatars.find(hash) != avatars.end(); }
+ virtual void addAvatar(const std::string& hash, const ByteArray& avatar) { avatars[hash] = avatar; }
+ virtual ByteArray getAvatar(const std::string& hash) const {
+ std::map<std::string, ByteArray>::const_iterator i = avatars.find(hash);
return i == avatars.end() ? ByteArray() : i->second;
}
- virtual boost::filesystem::path getAvatarPath(const String& hash) const {
- return boost::filesystem::path("/avatars") / hash.getUTF8String();
+ virtual boost::filesystem::path getAvatarPath(const std::string& hash) const {
+ return boost::filesystem::path("/avatars") / hash;
}
private:
- std::map<String, ByteArray> avatars;
+ std::map<std::string, ByteArray> avatars;
};
}