Ticket #2028: CInput_iterators.patch
File CInput_iterators.patch, 1.7 KB (added by , 11 years ago) |
---|
-
CInput.cpp
1390 1390 m_iBufferPos = std::min(m_iBufferPos, (int)caption.size()); 1391 1391 m_iBufferPos_Tail = std::min(m_iBufferPos_Tail, (int)caption.size()); 1392 1392 1393 if (font_name == CStrW())1393 if (font_name.empty()) 1394 1394 { 1395 1395 // Destroy everything stored, there's no font, so there can be 1396 1396 // no data. … … 1437 1437 // when continuing to see how much more after 'to' we need to remake. 1438 1438 int i=0; 1439 1439 for (std::list<SRow>::iterator it=m_CharacterPositions.begin(); 1440 it !=m_CharacterPositions.end(); ++it, ++i)1440 it != m_CharacterPositions.end(); ++it, ++i) 1441 1441 { 1442 1442 if (destroy_row_from_used == false && 1443 1443 it->m_ListStart > from) … … 1517 1517 // Setup the first row 1518 1518 row.m_ListStart = destroy_row_from->m_ListStart; 1519 1519 1520 // Set current line, new rows will be added before current_line, so1521 // we'll choose the destroy_row_to, because it won't be deleted1522 // in the coming erase.1523 current_line = destroy_row_to;1524 1525 1520 std::list<SRow>::iterator temp_it = destroy_row_to; 1526 1521 --temp_it; 1527 1522 1528 m_CharacterPositions.erase(destroy_row_from, destroy_row_to);1523 current_line = m_CharacterPositions.erase(destroy_row_from, destroy_row_to); 1529 1524 1530 1525 // If there has been a change in number of characters 1531 1526 // we need to change all m_ListStart that comes after … … 1534 1529 int delta = to_after - to_before; 1535 1530 if (delta != 0) 1536 1531 { 1537 for (std::list<SRow>::iterator it =current_line;1538 it !=m_CharacterPositions.end();1532 for (std::list<SRow>::iterator it = current_line; 1533 it != m_CharacterPositions.end(); 1539 1534 ++it) 1540 1535 { 1541 1536 it->m_ListStart += delta;