mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 20:07:36 +00:00
Everywhere: Stop using NonnullRefPtrVector
This class had slightly confusing semantics and the added weirdness doesn't seem worth it just so we can say "." instead of "->" when iterating over a vector of NNRPs. This patch replaces NonnullRefPtrVector<T> with Vector<NNRP<T>>.
This commit is contained in:
parent
104be6c8ac
commit
8a48246ed1
168 changed files with 1280 additions and 1280 deletions
|
@ -243,13 +243,13 @@ void BookmarksBarWidget::update_content_size()
|
|||
|
||||
for (size_t i = 0; i < m_bookmarks.size(); ++i) {
|
||||
auto& bookmark = m_bookmarks.at(i);
|
||||
if (x_position + bookmark.width() + m_additional->width() > width()) {
|
||||
if (x_position + bookmark->width() + m_additional->width() > width()) {
|
||||
m_last_visible_index = i;
|
||||
break;
|
||||
}
|
||||
bookmark.set_x(x_position);
|
||||
bookmark.set_visible(true);
|
||||
x_position += bookmark.width();
|
||||
bookmark->set_x(x_position);
|
||||
bookmark->set_visible(true);
|
||||
x_position += bookmark->width();
|
||||
}
|
||||
|
||||
if (m_last_visible_index < 0) {
|
||||
|
@ -261,8 +261,8 @@ void BookmarksBarWidget::update_content_size()
|
|||
m_additional->set_menu(m_additional_menu);
|
||||
for (size_t i = m_last_visible_index; i < m_bookmarks.size(); ++i) {
|
||||
auto& bookmark = m_bookmarks.at(i);
|
||||
bookmark.set_visible(false);
|
||||
m_additional_menu->add_action(GUI::Action::create(bookmark.text().to_deprecated_string(), g_icon_bag.filetype_html, [&](auto&) { bookmark.on_click(0); }));
|
||||
bookmark->set_visible(false);
|
||||
m_additional_menu->add_action(GUI::Action::create(bookmark->text().to_deprecated_string(), g_icon_bag.filetype_html, [&](auto&) { bookmark->on_click(0); }));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue