replace &x[0] with x.c_str()

This commit is contained in:
Arvid Norberg
2010-06-28 01:12:54 +00:00
parent 339b0019a4
commit b3128685d9

View File

@@ -615,7 +615,7 @@ namespace libtorrent
#endif #endif
x.append((char*)&t->torrent_file().info_hash()[0], 20); x.append((char*)&t->torrent_file().info_hash()[0], 20);
sha1_hash hash = hasher(&x[0], x.size()).final(); sha1_hash hash = hasher(x.c_str(), x.size()).final();
for (;;) for (;;)
{ {
char* p = (char*)&hash[0]; char* p = (char*)&hash[0];