optimized memory usage of torrent_info and file_storage

This commit is contained in:
Arvid Norberg
2010-11-24 23:49:22 +00:00
parent 7cd628e78d
commit 894db973e8
22 changed files with 501 additions and 204 deletions

View File

@@ -245,7 +245,7 @@ namespace libtorrent
m_data.start = start;
m_size = length;
m_begin = start - 1 - num_digits(length);
m_end = start + length;
m_len = start - m_begin + length;
}
namespace
@@ -400,7 +400,7 @@ namespace libtorrent
std::pair<char const*, int> lazy_entry::data_section() const
{
typedef std::pair<char const*, int> return_t;
return return_t(m_begin, m_end - m_begin);
return return_t(m_begin, m_len);
}
#if TORRENT_USE_IOSTREAM