Пример #1
0
/**
   Remove first match for specified string from circular list
*/
static void kill_remove(const wcstring &s)
{
    ASSERT_IS_MAIN_THREAD();
    kill_list_t::iterator iter = std::find(kill_list.begin(), kill_list.end(), s);
    if (iter != kill_list.end())
        kill_list.erase(iter);
}
Пример #2
0
const wchar_t *kill_yank_rotate() {
    ASSERT_IS_MAIN_THREAD();
    // Move the first element to the end.
    if (kill_list.empty()) {
        return NULL;
    }
    kill_list.splice(kill_list.end(), kill_list, kill_list.begin());
    return kill_list.front().c_str();
}