mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 05:32:31 +00:00
* Added TextElementBranch that uses a slot as the conditional.
* Added timeout to WindowText and updated download and peer info. * Moved default http agent string to rtorrent/configure.ac. * Periodic syncing of chunks now tries to only sync tightly packed ranges of chunks unless timeout_sync has been reached. * ChunkManager now checks if max memory is set to RLIM_INFINITY, if so use 2^32. * Added safe_sync option that forces MS_SYNC to be used before unmapping chunks. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@757 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -78,9 +78,9 @@ public:
|
||||
const std::string& str() const { return m_string; }
|
||||
void set_str(const std::string& s) { m_string = s; }
|
||||
|
||||
private:
|
||||
virtual extent_type max_length() { return m_string.size(); }
|
||||
|
||||
private:
|
||||
virtual char* copy_string(char* first, char* last, void* object);
|
||||
|
||||
std::string m_string;
|
||||
@@ -93,9 +93,9 @@ public:
|
||||
m_attributes = attributes;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual extent_type max_length() { return m_length; }
|
||||
|
||||
private:
|
||||
virtual char* copy_string(char* first, char* last, void* object);
|
||||
|
||||
extent_type m_length;
|
||||
@@ -113,16 +113,14 @@ public:
|
||||
m_attributes = attributes;
|
||||
}
|
||||
|
||||
private:
|
||||
virtual extent_type max_length() { return m_length; }
|
||||
|
||||
private:
|
||||
virtual char* copy_string(char* first, char* last, void* object) {
|
||||
arg1_type arg1 = reinterpret_cast<arg1_type>(object);
|
||||
|
||||
if (arg1 == NULL)
|
||||
if (object == NULL)
|
||||
return first;
|
||||
|
||||
result_type result = m_slot(arg1);
|
||||
result_type result = m_slot(reinterpret_cast<arg1_type>(object));
|
||||
extent_type length = std::min<extent_type>(result_length(&result), last - first);
|
||||
|
||||
std::memcpy(first, result_buffer(&result), length);
|
||||
|
||||
Reference in New Issue
Block a user