From 52a849870f39d358de588262a31603e1cd07c4ee Mon Sep 17 00:00:00 2001 From: tastytea Date: Mon, 8 Feb 2021 17:28:46 +0100 Subject: [PATCH] Make direction a string_view in answer_type::parse_pagination(). --- src/types.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/types.cpp b/src/types.cpp index 66f9acb..16efddd 100644 --- a/src/types.cpp +++ b/src/types.cpp @@ -1,5 +1,5 @@ /* This file is part of mastodonpp. - * Copyright © 2020 tastytea + * Copyright © 2020, 2021 tastytea * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU Affero General Public License as published by @@ -71,7 +71,7 @@ parametermap answer_type::parse_pagination(const bool next) const return {}; } - const auto direction{next ? R"(rel="next")" : R"(rel="prev")"}; + const string_view direction{next ? R"(rel="next")" : R"(rel="prev")"}; auto endpos{link.find(direction)}; endpos = link.rfind('>', endpos); auto startpos{link.rfind('?', endpos) + 1};