File tree Expand file tree Collapse file tree 6 files changed +11
-11
lines changed
Expand file tree Collapse file tree 6 files changed +11
-11
lines changed Original file line number Diff line number Diff line change @@ -182,7 +182,7 @@ split_commas(FwdIt first, FwdIt last)
182182
183183template <class Result = std::vector<std::string>>
184184Result
185- split_commas (std::string_view const & s)
185+ split_commas (std::string_view s)
186186{
187187 return split_commas (s.begin (), s.end ());
188188}
Original file line number Diff line number Diff line change @@ -8,12 +8,12 @@ namespace Json {
88
99class Value ;
1010
11- using Output = std::function<void (std::string_view const & )>;
11+ using Output = std::function<void (std::string_view)>;
1212
1313inline Output
1414stringOutput (std::string& s)
1515{
16- return [&](std::string_view const & b) { s.append (b.data (), b.size ()); };
16+ return [&](std::string_view b) { s.append (b.data (), b.size ()); };
1717}
1818
1919/* * Writes a minimal representation of a Json value to an Output in O(n) time.
Original file line number Diff line number Diff line change @@ -88,14 +88,14 @@ class Writer::Impl
8888 }
8989
9090 void
91- output (std::string_view const & bytes)
91+ output (std::string_view bytes)
9292 {
9393 markStarted ();
9494 output_ (bytes);
9595 }
9696
9797 void
98- stringOutput (std::string_view const & bytes)
98+ stringOutput (std::string_view bytes)
9999 {
100100 markStarted ();
101101 std::size_t position = 0 , writtenUntil = 0 ;
Original file line number Diff line number Diff line change @@ -56,7 +56,7 @@ to_string(ProtocolVersion const& p)
5656}
5757
5858std::vector<ProtocolVersion>
59- parseProtocolVersions (std::string_view const & value)
59+ parseProtocolVersions (std::string_view value)
6060{
6161 static boost::regex const re (
6262 " ^" // start of line
@@ -126,7 +126,7 @@ negotiateProtocolVersion(std::vector<ProtocolVersion> const& versions)
126126}
127127
128128std::optional<ProtocolVersion>
129- negotiateProtocolVersion (std::string_view const & versions)
129+ negotiateProtocolVersion (std::string_view versions)
130130{
131131 auto const them = parseProtocolVersions (versions);
132132
Original file line number Diff line number Diff line change @@ -38,15 +38,15 @@ to_string(ProtocolVersion const& p);
3838 no duplicates and will be sorted in ascending protocol order.
3939*/
4040std::vector<ProtocolVersion>
41- parseProtocolVersions (std::string_view const & s);
41+ parseProtocolVersions (std::string_view s);
4242
4343/* * Given a list of supported protocol versions, choose the one we prefer. */
4444std::optional<ProtocolVersion>
4545negotiateProtocolVersion (std::vector<ProtocolVersion> const & versions);
4646
4747/* * Given a list of supported protocol versions, choose the one we prefer. */
4848std::optional<ProtocolVersion>
49- negotiateProtocolVersion (std::string_view const & versions);
49+ negotiateProtocolVersion (std::string_view versions);
5050
5151/* * The list of all the protocol versions we support. */
5252std::string const &
Original file line number Diff line number Diff line change @@ -230,7 +230,7 @@ ServerHandler::onHandoff(
230230static inline Json::Output
231231makeOutput (Session& session)
232232{
233- return [&](std::string_view const & b) { session.write (b.data (), b.size ()); };
233+ return [&](std::string_view b) { session.write (b.data (), b.size ()); };
234234}
235235
236236static std::map<std::string, std::string>
@@ -535,7 +535,7 @@ ServerHandler::processSession(
535535 auto const iter = session->request ().find (" X-User" );
536536 if (iter != session->request ().end ())
537537 {
538- auto const val = iter->value ();
538+ auto const & val = iter->value ();
539539 return std::string_view (val.data (), val.size ());
540540 }
541541 return std::string_view{};
You can’t perform that action at this time.
0 commit comments