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
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
release v0.21.24
...
-----BEGIN PGP SIGNATURE-----
iQJEBAABCgAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAl7hRzQQHG1heEBtdXNp
Y3BkLm9yZwAKCRAjbopYxttFEp7dD/483fkBEyipufQyQT9nntP8R/vqKlUT+M9V
8LyoJBtNtbNkO4bdrgAQCzElYzkDnd8VR++ZDEcqSEF49y5wafsiuufJNW2/s02Y
ygAqgTCpcuS58F7aK92CW99bhZcKC6zoQovkenSMaZ39gorE1ZuO1JyrFR1LWOat
ELekougQe0JbX2YX0YOH0Qags5fv9joxYJYsx8ZC60sCRNc+h8CBQjpyhZqzk7wC
EPviLeMDw5lXkoSI3C045QmwJRFG8GMEyZ/4E/mnibxoTXBJmsm4ArKrfJznrUUs
r8Mkf4G7sVqbsRMyMFBpzw+lsRDpVWI26mhdah9Y1zuUYPaEMe7OVKuEsASJQ/oK
33wRSBVZc7EPhV3m8f7U8NAJI0/XaaPKGgP2OrtnOfxD+OyAze4vNLZ/GJCYSsh+
wN1grmJw1mTP52xBicN2AITqXSVVpuvznn+p0g9MBB9Nw8/vbeWaqGPQhMHGHW6a
JIL9yUTWwhkvkhav1bT7zKaeZv3qfgO7fjkgJqQFYt/q4FZwPFHJme55mVGq9d1y
FNR8BMh+0A8hRhhQVwVycLxr4+NJja3vaqx+uVG2kov1g3eQBSgnEYCiEV7uls4V
Pr4sIEeU/QQ+0jsMoJCaW65bNm4tOGKibpjSHrwJ+gxwKn3N7sJaAOo7PgGsUZyS
30cBC5zkjw==
=XHev
-----END PGP SIGNATURE-----
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
Max Kellermann
f04a245769
util/AllocatedString: add noexcept
2020-04-03 15:26:47 +02:00
Max Kellermann
a8687fb7df
util/AllocatedString: use using
instead of typedef
2020-04-03 15:25:37 +02:00
Max Kellermann
3b88bac07c
util/StringPointer: add noexcept
2020-04-03 15:25:33 +02:00
Max Kellermann
358f231391
util/StringPointer: use using
instead of typedef
2020-04-03 15:25:16 +02:00
Max Kellermann
7d7bd51bc0
util/AllocatedArray: use using
instead of typedef
2020-04-01 15:42:55 +02:00
Rosen Penev
3540cf26b1
replace exit and _exit with std variants
...
_exit and std::_Exit are identical, expect the latter is standard C++.
Added several functions to the std namespace as a result of headers.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26 18:44:09 -07:00
Max Kellermann
e1c43ec65f
Merge branch 'ucl' of git://github.com/neheb/MPD into v0.21.x
2020-03-26 17:28:21 +01:00
Rosen Penev
608d7ec1e7
[clang-tidy] change integer prefixes to uppercase
...
Found with readability-uppercase-literal-suffix
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-26 17:25:20 +01:00
Rosen Penev
85c27840a3
treewide: use boost::lround when std::round is unavailable
...
This is the case with uClibc-ng currently.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
(cherry picked from commit 769cd0ee9f0cf8ceb026aa751b5d4a390bb5dbdc)
(changed define to match master)
2020-03-25 18:54:15 -07:00
Rosen Penev
cfa4524cb3
util/Math: change define
...
This has nothing to do with uClibc. It has everything to do with gcc's
libstdc++.
C99 math can be compile time disabled for it. Check for that and use boost
lround when std is not available.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-25 19:27:45 +01:00
Rosen Penev
4fd0c84f46
replace lrint with lround
...
lrint is a configurable version of lround that behaves either as round,
floor, ceil, or trunc based on setting the proper FE_ macro using
fset/getround. Given that it's not set at all and that it defaults to
round behavior, simply replace with round.
Also removed the util/Math defines.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-25 19:27:44 +01:00
Rosen Penev
9bad5ee3c5
remove boost pow stuff for uClibc-ng
...
It's available there.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-24 17:21:21 -07:00
Max Kellermann
637840264a
util/WStringCompare: reorder functions to relocate API docs
2020-03-22 19:20:29 +01:00
Max Kellermann
3888bafc1f
util/StringCompare: add API documentation
2020-03-22 19:15:55 +01:00
Max Kellermann
adad4c7298
util/StringCompare: add missing include
2020-03-22 19:12:02 +01:00
Max Kellermann
1ec283d213
util/Exception: include cleanup
2020-03-19 20:13:04 +01:00
Max Kellermann
fd71514068
Merge remote-tracking branch 'neheb/h'
2020-03-16 17:29:05 +01:00
Rosen Penev
97425d56e7
remove gcc_unused
...
[[maybe_unused]] (introduced in C++17) is standard C++.
https://clang.llvm.org/docs/AttributeReference.html#maybe-unused-unused
says that this is equivalent to the GNU unused attribute.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Rosen Penev
0afb156a5b
remove gcc_warn_unused
...
[[nodiscard] (introduced in C++17) can be used instead.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Rosen Penev
a192e7b29b
remove gcc_deprecated
...
[[deprecated]] (introduced in C++14) may be used instead.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:21 -07:00
Rosen Penev
591f51f3d3
replace noreturn attribute with standard C++ version
...
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-16 00:08:18 -07:00
Rosen Penev
177371a003
treewide: get rid of C math function usage
...
Boost does not seem to offer an overload for lrint.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-15 20:22:07 -07:00
Rosen Penev
3ec9fcfc44
treewide: use boost::lround when std::round is unavailable
...
This is the case with uClibc-ng currently.
Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-03-15 20:17:31 -07:00
Max Kellermann
b5d1a09010
util/StringUtil: pass std::string_view to StringArrayContainsCase()
2020-03-13 20:38:40 +01:00
Max Kellermann
85b072b3d3
util/StringCompare: add StringIsEqual() with string_view
2020-03-13 20:36:48 +01:00
Max Kellermann
8a1f1fbe06
util/ASCII: migrate to std::string_view
2020-03-13 20:17:53 +01:00
Max Kellermann
3796247d6d
util/Stringview: use const_pointer
instead of hard-coding const char *
...
Fixes Windows build failure.
2020-03-13 19:43:23 +01:00