* Use HashString for hash and id which contains the 20 byte array

directly, instead of using std::string.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@799 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
rakshasa
2006-10-31 11:20:31 +00:00
parent c9d8a2406d
commit 9d465de7e1
11 changed files with 46 additions and 21 deletions
+2
View File
@@ -40,6 +40,7 @@
#include <string>
#include <vector>
#include <inttypes.h>
#include <torrent/hash_string.h>
namespace display {
@@ -70,6 +71,7 @@ public:
// Fix this...
std::string str(const char* id) const;
std::string str_str(const std::string& id) const { return str(id.c_str()); }
std::string hash_str(const torrent::HashString& id) const { return str(id.c_str()); }
size_type sizeof_key(Type t) const {
switch (t) {
+1 -1
View File
@@ -138,7 +138,7 @@ WindowPeerList::redraw() {
x += 7;
char buf[128];
control->client_info()->print(buf, buf + 128, p.id().c_str());
control->client_info()->print(buf, buf + 128, p.id().data());
m_canvas->print(x, y, "%s", buf);