mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-08-08 09:09:43 +00:00
LibWeb: Change IDL::parse_interface's return type to NonnullOwnPtr
We always returned an interface, so there's no need for the null state.
This commit is contained in:
parent
2020ced9f1
commit
87f655f2af
Notes:
sideshowbarker
2024-07-18 03:21:40 +09:00
Author: https://github.com/IdanHo
Commit: 87f655f2af
Pull-request: https://github.com/SerenityOS/serenity/pull/10250
Reviewed-by: https://github.com/linusg ✅
1 changed files with 1 additions and 6 deletions
|
@ -167,7 +167,7 @@ struct Interface {
|
||||||
bool is_legacy_platform_object() const { return !extended_attributes.contains("Global") && (supports_indexed_properties() || supports_named_properties()); }
|
bool is_legacy_platform_object() const { return !extended_attributes.contains("Global") && (supports_indexed_properties() || supports_named_properties()); }
|
||||||
};
|
};
|
||||||
|
|
||||||
static OwnPtr<Interface> parse_interface(StringView filename, StringView const& input)
|
static NonnullOwnPtr<Interface> parse_interface(StringView filename, StringView const& input)
|
||||||
{
|
{
|
||||||
auto interface = make<Interface>();
|
auto interface = make<Interface>();
|
||||||
|
|
||||||
|
@ -619,11 +619,6 @@ int main(int argc, char** argv)
|
||||||
auto data = file_or_error.value()->read_all();
|
auto data = file_or_error.value()->read_all();
|
||||||
auto interface = IDL::parse_interface(path, data);
|
auto interface = IDL::parse_interface(path, data);
|
||||||
|
|
||||||
if (!interface) {
|
|
||||||
warnln("Cannot parse {}", path);
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (namespace_.is_one_of("CSS", "DOM", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "NavigationTiming", "RequestIdleCallback", "SVG", "XHR", "URL")) {
|
if (namespace_.is_one_of("CSS", "DOM", "HTML", "UIEvents", "Geometry", "HighResolutionTime", "NavigationTiming", "RequestIdleCallback", "SVG", "XHR", "URL")) {
|
||||||
StringBuilder builder;
|
StringBuilder builder;
|
||||||
builder.append(namespace_);
|
builder.append(namespace_);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue