File tree Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Expand file tree Collapse file tree 2 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -46,7 +46,7 @@ inline StringType escape(StringType const& s)
4646 if (ch == CharT (' ~' ))
4747 {
4848 res.push_back (CharT (' ~' ));
49- res.push_back (CharT{' 0' });
49+ res.push_back (CharT{' 0' });
5050 }
5151 else if (ch == CharT (' /' ))
5252 {
Original file line number Diff line number Diff line change @@ -3085,7 +3085,7 @@ namespace detail
30853085{
30863086
30873087/*!
3088- * @brief Out Of Place string escaping as described in RFC 6901 (Sect. 4)
3088+ * @brief Returns a copy of a string escaped as described in RFC 6901 (Sect. 4)
30893089 * @param[in] s string to escape
30903090 * @return escaped string
30913091 *
@@ -3115,11 +3115,13 @@ inline StringType escape(StringType const& s)
31153115 {
31163116 if (ch == CharT('~'))
31173117 {
3118- res.append(StringType{"~0"});
3118+ res.push_back(CharT('~'));
3119+ res.push_back(CharT{'0'});
31193120 }
31203121 else if (ch == CharT('/'))
31213122 {
3122- res.append(StringType{"~1"});
3123+ res.push_back(CharT{'~'});
3124+ res.push_back(CharT{'1'});
31233125 }
31243126 else
31253127 {
@@ -3131,7 +3133,7 @@ inline StringType escape(StringType const& s)
31313133}
31323134
31333135/*!
3134- * @brief In Place string unescaping as described in RFC 6901 (Sect. 4)
3136+ * @brief Unescapes a string as described in RFC 6901 (Sect. 4), in-place
31353137 * @param[in] s string to unescape
31363138 *
31373139 */
You can’t perform that action at this time.
0 commit comments