From 8ff9b6338badb6bc265e483575621b880f82d7cf Mon Sep 17 00:00:00 2001 From: Arvid Norberg Date: Thu, 25 Nov 2010 10:46:52 +0000 Subject: [PATCH] some fixes --- examples/dump_torrent.cpp | 2 +- src/lazy_bdecode.cpp | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/examples/dump_torrent.cpp b/examples/dump_torrent.cpp index 8a6eebc3f..4be08af1a 100644 --- a/examples/dump_torrent.cpp +++ b/examples/dump_torrent.cpp @@ -132,7 +132,7 @@ int main(int argc, char* argv[]) i != t.end_files(); ++i, ++index) { int first = t.map_file(index, 0, 0).piece; - int last = t.map_file(index, (std::max)(i->size-1, size_type(0)), 0).piece; + int last = t.map_file(index, (std::max)(size_type(i->size)-1, size_type(0)), 0).piece; printf(" %11"PRId64" %c%c%c%c [ %4d, %4d ] %7u %s %s %s%s\n" , i->size , (i->pad_file?'p':'-') diff --git a/src/lazy_bdecode.cpp b/src/lazy_bdecode.cpp index 69bc03ddb..09d8f0e39 100644 --- a/src/lazy_bdecode.cpp +++ b/src/lazy_bdecode.cpp @@ -180,10 +180,8 @@ namespace libtorrent continue; } } - printf("lazy_bdecode item_limit: %d\n", item_limit); return 0; } - printf("lazy_bdecode item_limit: %d\n", item_limit); return 0; }