mirror of
https://github.com/nghttp2/nghttp2.git
synced 2025-12-06 18:18:52 +08:00
clang-format
This commit is contained in:
@@ -55,9 +55,9 @@ StringRef get_attr(const xmlChar **attrs, const StringRef &name) {
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
ResourceType get_resource_type_for_preload_as(const StringRef &attribute_value) {
|
ResourceType
|
||||||
|
get_resource_type_for_preload_as(const StringRef &attribute_value) {
|
||||||
if (util::strieq_l("image", attribute_value)) {
|
if (util::strieq_l("image", attribute_value)) {
|
||||||
return REQ_IMG;
|
return REQ_IMG;
|
||||||
} else if (util::strieq_l("style", attribute_value)) {
|
} else if (util::strieq_l("style", attribute_value)) {
|
||||||
@@ -70,7 +70,6 @@ ResourceType get_resource_type_for_preload_as(const StringRef &attribute_value)
|
|||||||
}
|
}
|
||||||
} // namespace
|
} // namespace
|
||||||
|
|
||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
void add_link(ParserData *parser_data, const StringRef &uri,
|
void add_link(ParserData *parser_data, const StringRef &uri,
|
||||||
ResourceType res_type) {
|
ResourceType res_type) {
|
||||||
@@ -109,7 +108,8 @@ void start_element_func(void *user_data, const xmlChar *src_name,
|
|||||||
if (as_attr.empty()) {
|
if (as_attr.empty()) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
add_link(parser_data, href_attr, get_resource_type_for_preload_as(as_attr));
|
add_link(parser_data, href_attr,
|
||||||
|
get_resource_type_for_preload_as(as_attr));
|
||||||
}
|
}
|
||||||
} else if (util::strieq_l("img", name)) {
|
} else if (util::strieq_l("img", name)) {
|
||||||
auto src_attr = get_attr(attrs, StringRef::from_lit("src"));
|
auto src_attr = get_attr(attrs, StringRef::from_lit("src"));
|
||||||
|
|||||||
Reference in New Issue
Block a user