mirror of
https://github.com/RGBCube/serenity
synced 2025-07-25 12:07:45 +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
|
@ -390,7 +390,7 @@ void WorkbookObject::visit_edges(Visitor& visitor)
|
|||
{
|
||||
Base::visit_edges(visitor);
|
||||
for (auto& sheet : m_workbook.sheets())
|
||||
visitor.visit(&sheet.global_object());
|
||||
visitor.visit(&sheet->global_object());
|
||||
}
|
||||
|
||||
JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
|
||||
|
@ -411,13 +411,13 @@ JS_DEFINE_NATIVE_FUNCTION(WorkbookObject::sheet)
|
|||
if (name_value.is_string()) {
|
||||
auto name = TRY(name_value.as_string().deprecated_string());
|
||||
for (auto& sheet : workbook.sheets()) {
|
||||
if (sheet.name() == name)
|
||||
return JS::Value(&sheet.global_object());
|
||||
if (sheet->name() == name)
|
||||
return JS::Value(&sheet->global_object());
|
||||
}
|
||||
} else {
|
||||
auto index = TRY(name_value.to_length(vm));
|
||||
if (index < workbook.sheets().size())
|
||||
return JS::Value(&workbook.sheets()[index].global_object());
|
||||
return JS::Value(&workbook.sheets()[index]->global_object());
|
||||
}
|
||||
|
||||
return JS::js_undefined();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue