This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if view.get_insert_spaces_instead_of_tabs(): | |
tabsize = view.get_tab_width() | |
spaces = " " * tabsize | |
after = after.replace("\t",spaces) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
void | |
Drawing::_pickItemsForCaching() | |
{ | |
// we cache the objects with the highest score until the budget is exhausted | |
_candidate_items.sort(std::greater<CacheRecord>()); | |
size_t used = 0; | |
CandidateList::iterator i; | |
for (i = _candidate_items.begin(); i != _candidate_items.end(); ++i) { | |
if (used + i->cache_size > _cache_budget) break; | |
used += i->cache_size; |