mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-07 18:52:30 +00:00
* Added various TextElement flags and replaced WindowPeerInfo with a
WindowText. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@756 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -51,14 +51,14 @@ TextElementList::clear() {
|
||||
}
|
||||
|
||||
char*
|
||||
TextElementList::print(char* first, const char* last, Canvas::attributes_list* attributes, void* object) {
|
||||
TextElementList::print(char* first, char* last, Canvas::attributes_list* attributes, void* object) {
|
||||
int column = m_columnWidth != NULL ? m_column : 0;
|
||||
|
||||
// Call print for each element even if first == last so that any
|
||||
// attributes gets added to the list.
|
||||
for (iterator itr = begin(); itr != end(); ++itr)
|
||||
if (column-- > 0) {
|
||||
const char* columnEnd = std::min<const char*>(last, first + *m_columnWidth);
|
||||
char* columnEnd = std::min(last, first + *m_columnWidth);
|
||||
|
||||
if (columnEnd < first || columnEnd > last)
|
||||
throw torrent::client_error("TextElementList::print(...) columnEnd < first || columnEnd > last.");
|
||||
@@ -69,7 +69,7 @@ TextElementList::print(char* first, const char* last, Canvas::attributes_list* a
|
||||
throw torrent::client_error("TextElementList::print(...) first > columnEnd.");
|
||||
|
||||
std::memset(first, ' ', columnEnd - first);
|
||||
first += columnEnd - first;
|
||||
first = columnEnd;
|
||||
|
||||
} else {
|
||||
first = (*itr)->print(first, last, attributes, object);
|
||||
|
||||
Reference in New Issue
Block a user