Commit Graph

595 Commits

Author SHA1 Message Date
Max Kellermann dc9103befe util/AllocatedString: remove Null(), IsNull() 2021-03-04 18:05:29 +01:00
Max Kellermann 67760f5283 util/AllocatedString: support casting a nulled instance to string_view 2021-03-04 18:05:29 +01:00
Max Kellermann 99405a4c93 util/AllocatedString: add operator=() 2021-03-04 18:05:26 +01:00
Max Kellermann b833c5d2c7 util/AllocatedString: replace Clone() with copy constructor 2021-03-04 18:04:21 +01:00
Max Kellermann bca5d79f88 util/AllocatedString: add const_pointer constructor 2021-03-04 18:04:17 +01:00
Max Kellermann 6e1c8edf09 util/AllocatedString: add string_view constructor
Replaces the static Duplicate() method.
2021-03-04 18:04:11 +01:00
Max Kellermann 32b7b2e2fa util/AllocatedString: add default constructor 2021-03-04 18:04:06 +01:00
Max Kellermann cfb7f8ab84 util/AllocatedString: rename to BasicAllocatedString
To make things simpler, AllocatedString is now a non-template class.
2021-03-04 18:03:56 +01:00
Max Kellermann 056ab199ab util/PeakBuffer: add method max_size() 2021-01-21 16:45:56 +01:00
Max Kellermann eea0e084af util/PeakBuffer: use std::byte instead of std::uint8_t 2021-01-21 16:45:31 +01:00
Max Kellermann fa82f558be util/PeakBuffer: add noexcept 2021-01-21 16:45:17 +01:00
Max Kellermann 6b555b7017 util/PeakBuffer: use std::size_t 2021-01-21 16:45:14 +01:00
Max Kellermann dafba203e7 util/ForeignFifoBuffer: use auto 2021-01-21 16:38:32 +01:00
Max Kellermann 07d2bc6898 util/StringView: add method SplitLast() 2021-01-21 13:20:01 +01:00
Vincent Petry 74b2fc7fdc Use uri_has_scheme for Webdav response href
Use uri_has_scheme to find out if the href in Webdav responses is absolute
to use the matching base path extraction.

Signed-off-by: Vincent Petry <PVince81@yahoo.fr>
2021-01-05 12:04:08 +01:00
Max Kellermann 5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann 6bc73a9ebe util/FormatString: update API documentation 2020-10-28 15:48:42 +01:00
Max Kellermann 7c8427b0f7 Merge branch 'v0.21.x' into master 2020-09-21 11:37:50 +02:00
Max Kellermann b72801abf3 util/ByteOrder: add FromLE16S() 2020-09-21 11:15:45 +02:00
Max Kellermann 540919f256 *: use nullptr instead of NULL 2020-09-07 20:08:27 +02:00
Max Kellermann 67c7116f05 Merge branch 'v0.21.x' into master 2020-09-04 18:35:21 +02:00
Max Kellermann cbcdc73f9a system/ByteOrder: add noexcept 2020-08-14 16:36:24 +02:00
Max Kellermann 155fc8fa5a include cleanup 2020-07-23 16:26:18 +02:00
Max Kellermann 7daf80a0c0 util/RuntimeError: add IWYU pragma 2020-07-23 16:10:28 +02:00
Max Kellermann eb87c28225 util/CharUtil: fix doc typo 2020-07-23 16:08:52 +02:00
Max Kellermann df38e7565b util/HugeAllocator: import std::swap() 2020-07-01 21:56:58 +02:00
Max Kellermann cb49a03fd7 util/HugeAllocator: add noexcept 2020-07-01 21:56:54 +02:00
Max Kellermann 472881cb95 util/ByteOrder: remove redundant inline keywords from constexpr functions 2020-07-01 17:50:34 +02:00
Max Kellermann c4efc37ad8 system/ByteOrder: move to util/ 2020-07-01 17:49:57 +02:00
Max Kellermann 3d7147390f Merge branch 'v0.21.x' 2020-07-01 16:56:17 +02:00
Max Kellermann a43ee97746 util/UriUtil: strip credentials from smb:// URIs
Closes https://github.com/MusicPlayerDaemon/MPD/issues/910
2020-06-22 22:48:56 +02:00
Max Kellermann 43c32372e7 util/UriUtil: make schemes array static 2020-06-22 22:48:07 +02:00
Max Kellermann c6a7f6dabc Merge tag 'v0.21.24'
release v0.21.24
2020-06-10 22:58:41 +02:00
Max Kellermann 14412c867f add a few IWYU pragmas 2020-06-10 21:10:33 +02:00
Rosen Penev e4dad42ca1 use std chr functions
The ones in std have overloads for const char/char.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:36:53 +02:00
Rosen Penev 1008d5f67c use cwchar include
Needed for std::wmemchr under libcxx

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-05-30 13:22:04 +02:00
Max Kellermann bdc861f058 util/TemplateString: remove extra semicolon 2020-05-27 15:46:55 +02:00
Max Kellermann be94b4373a util/OffsetPointer: add noexcept 2020-05-14 15:44:23 +02:00
Max Kellermann 60f957ed64 util/MimeType: use string_view::substr()
Fixes regression from commit db93bb996c because
ParseMimeTypeParameters() assumed the items were null-terminated, but
after that commit, they were not anymore.
2020-05-06 20:33:13 +02:00
Max Kellermann ba576ffa37 Merge branch 'v0.21.x' 2020-05-05 19:00:53 +02:00
Rosen Penev 47a7707df1 Math.hxx: fix wrong macro name
_GLIBCXX_USE_C99_MATH_TR1 is the correct one.

_GLIBCXX_USE_C99_MATH is always defined.
2020-04-29 23:20:04 +02:00
Max Kellermann 814b2a218d util/CharUtil: add IsNonPrintableASCII()
Prepare to fix cc72ceb368
2020-04-27 14:01:54 +02:00
Max Kellermann 18ca734819 util/DereferenceIterator: new utility class 2020-04-24 16:02:31 +02:00
Rosen Penev 6080c3b4ba Math.hxx: move cmath include out of define
The _GLIBCXX_USE_C99_MATH macro is defined in glibcxx by c++config.h, which
gets included by every header. Which means a header needs to be present.

(cherry picked from commit 79e9aff338)
2020-04-09 14:24:06 -07:00
Max Kellermann db93bb996c util/SplitString: convert return value to std::string_view
Eliminates lots of overhead.
2020-04-08 23:14:25 +02:00
Rosen Penev 79e9aff338 Math.hxx: move cmath include out of define
The _GLIBCXX_USE_C99_MATH macro is defined in glibcxx by c++config.h, which
gets included by every header. Which means a header needs to be present.
2020-04-07 20:14:00 -07:00
Max Kellermann 3a51fe31df util/ConstBuffer, ...: use using instead of typedef 2020-04-06 15:19:12 +02:00
Max Kellermann cc3e71d8c7 util/CharUtil: add IsHexDigit() 2020-04-06 15:07:08 +02:00
Max Kellermann 870151214d util/SplitString: convert parameter to std::string_view 2020-04-03 16:47:45 +02:00
Max Kellermann 915c48f748 util/AllocatedString: std::string_view support 2020-04-03 16:08:55 +02:00