1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 07:08:10 +00:00

LibManual: Fix const-correctness issues

This commit is contained in:
Andreas Kling 2023-02-20 18:59:53 +01:00
parent f11899f885
commit dbcf2f2dd4
8 changed files with 18 additions and 18 deletions

View file

@ -17,7 +17,7 @@
namespace Manual {
ErrorOr<NonnullRefPtr<PageNode>> Node::try_create_from_query(Vector<StringView, 2> const& query_parameters)
ErrorOr<NonnullRefPtr<PageNode const>> Node::try_create_from_query(Vector<StringView, 2> const& query_parameters)
{
if (query_parameters.size() > 2)
return Error::from_string_literal("Queries longer than 2 strings are not supported yet");
@ -66,7 +66,7 @@ ErrorOr<NonnullRefPtr<PageNode>> Node::try_create_from_query(Vector<StringView,
return Error::from_string_literal("Page doesn't exist in section");
}
ErrorOr<NonnullRefPtr<Node>> Node::try_find_from_help_url(URL const& url)
ErrorOr<NonnullRefPtr<Node const>> Node::try_find_from_help_url(URL const& url)
{
if (url.host() != "man")
return Error::from_string_view("Bad help operation"sv);
@ -82,7 +82,7 @@ ErrorOr<NonnullRefPtr<Node>> Node::try_find_from_help_url(URL const& url)
if (section_number > number_of_sections)
return Error::from_string_view("Section number out of bounds"sv);
NonnullRefPtr<Node> current_node = sections[section_number - 1];
NonnullRefPtr<Node const> current_node = sections[section_number - 1];
while (!paths.is_empty()) {
auto next_path_segment = TRY(String::from_deprecated_string(paths.take_first()));