summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authortastytea2021-02-08 17:28:46 +0100
committertastytea2021-02-08 17:28:46 +0100
commit52a849870f39d358de588262a31603e1cd07c4ee (patch)
tree0f2c7c1f52029b5e762718d745019b428ec1da41
parentaabcb46602cabadc3f315a18891f290194a4bd12 (diff)
downloadmastodonpp-52a849870f39d358de588262a31603e1cd07c4ee.tar
mastodonpp-52a849870f39d358de588262a31603e1cd07c4ee.tar.gz
mastodonpp-52a849870f39d358de588262a31603e1cd07c4ee.zip
Make direction a string_view in answer_type::parse_pagination().
-rw-r--r--src/types.cpp4
1 files 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 <tastytea@tastytea.de>
+ * Copyright © 2020, 2021 tastytea <tastytea@tastytea.de>
*
* 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};