mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-17 15:42:30 +00:00
* 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:
@@ -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) {
|
||||
|
||||
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user