Commit Graph

446 Commits

Author SHA1 Message Date
Ilya ilyxa Tyshchenko
2becf79223 correct action for compile on Solaris 11.3 X86 2017-12-21 18:42:36 +01:00
Max Kellermann
1d559bf00c util/SliceBuffer: add "noexcept" 2017-12-20 14:41:03 +01:00
Max Kellermann
3d960b5e55 util/RuntimeError: add FormatInvalidArgument() 2017-12-19 11:56:29 +01:00
Max Kellermann
edee8a3446 Compiler.h: add gcc_returns_nonnull, gcc_returns_twice 2017-12-18 23:00:13 +01:00
Max Kellermann
6246d36fe6 Merge branch 'v0.20.x' 2017-12-16 20:56:06 +01:00
Max Kellermann
dfaf08743c *: check defined(_WIN32) instead of defined(WIN32)
Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
2017-12-12 10:22:20 +01:00
Max Kellermann
2670e13cbd util/{Const,Writable}Buffer: add static_assert to FromVoid() 2017-11-10 19:43:17 +01:00
Max Kellermann
49784513b1 util/{Const,Writable}Buffer, ...: rename IsEmpty() to empty(), imitating STL 2017-11-10 19:24:33 +01:00
Max Kellermann
034bb13e1c util/HugeAllocator: add missing "static inline"
Fixes the non-Linux build.
2017-10-26 09:01:06 +02:00
Max Kellermann
c8a2a557db util/HugeAllocator: remove obsolete class HugeAllocation 2017-09-21 21:52:08 +02:00
Max Kellermann
7b2b965415 util/SliceBuffer: use class HugeArray 2017-09-21 21:48:08 +02:00
Max Kellermann
c3cfa18ebe util/HugeAllocator: add template class HugeArray 2017-09-21 21:47:52 +02:00
Max Kellermann
b46835e15e util/HugeAllocator: HugeAllocator() returns WritableBuffer<void> 2017-09-21 21:47:49 +02:00
Max Kellermann
3e5ce3c92c util/{Const,Writable}Buffer: add static method FromVoidFloor() 2017-09-21 21:45:39 +02:00
Max Kellermann
e5c9b4cd75 util/{Const,Writable}Buffer: add operator==(nullptr_t) 2017-09-21 20:34:36 +02:00
Max Kellermann
8753e558f2 util/HugeAllocator: move MADV_DONTFORK setting to HugeForkCow()
Enforcing MADV_DONTFORK is a surprising limitation for this library
which aims to be generic.
2017-09-21 19:36:33 +02:00
Max Kellermann
56a9bf459d util/SliceBuffer: use C++11 initializers 2017-09-19 19:48:04 +02:00
Max Kellermann
11dbba3503 util/HugeAllocator: document std::bad_alloc 2017-09-19 19:45:52 +02:00
Max Kellermann
8662427d48 util/HugeAllocator: use std::exchange() 2017-09-19 19:42:21 +02:00
Max Kellermann
821480d329 util/HugeAllocator: make constructor explicit 2017-09-19 19:42:19 +02:00
Max Kellermann
c196710fae util/WStringCompare: relicense to BSD-2 2017-09-13 16:43:41 +02:00
Max Kellermann
e4f62483ff util/StringView: add default constructors
It was implicitly deleted since commit
db23c2f27b
2017-09-13 12:59:31 +02:00
Max Kellermann
8d9347edc5 Util/WStringCompare: use struct WStringView 2017-09-13 11:47:48 +02:00
Max Kellermann
eff821c1ca Util/StringView: move struct WStringView to separate header 2017-09-13 11:22:59 +02:00
Max Kellermann
3bcd6ecbad util/Exception: update API documentation 2017-09-13 10:49:34 +02:00
Max Kellermann
e76f4c2ae9 util/DeleteDisposer: convert struct to class 2017-09-13 10:35:51 +02:00
Max Kellermann
f46ac45d69 util/*: update include guards 2017-09-13 10:35:11 +02:00
Max Kellermann
1d1259a86d util/AllocatedString: add method data() 2017-09-13 10:34:12 +02:00
Max Kellermann
101f08ca75 util/Cast: make the "member" pointer const 2017-09-13 10:32:55 +02:00
Max Kellermann
3b7f9827ab Util/IterableSplitString: add wchar_t specialization 2017-09-12 19:12:09 +02:00
Max Kellermann
f98bf39005 Util/IterableSplitString: add template class BasicIterableSplitString 2017-09-12 19:12:09 +02:00
Max Kellermann
9e7df54ccd Util/StringView: add struct TStringView 2017-09-12 19:12:09 +02:00
Max Kellermann
db23c2f27b util/StringView: allow casting from BasicStringView to StringView 2017-09-12 19:08:47 +02:00
Max Kellermann
9744f437d8 Util/CharUtil: add wchar_t overloads
Needed for WStringView.
2017-09-12 18:22:02 +02:00
Max Kellermann
01f84b0e53 util/StringView: add struct WStringView 2017-09-12 17:17:13 +02:00
Max Kellermann
5dbdd36263 util/StringView: add struct BasicStringView 2017-09-12 17:17:13 +02:00
Max Kellermann
96b557c1f0 util/StringView: remove methods SetEmpty(), Empty() 2017-09-12 17:17:13 +02:00
Max Kellermann
ebdb7c8de2 util/WStringAPI: add StringIsEqualIgnoreCase() overload 2017-09-12 17:17:13 +02:00
Max Kellermann
1fda842ee6 util/StringView: use StringAPI.hxx 2017-09-12 17:00:42 +02:00
Max Kellermann
f71e20d0ce util/StringView: use value_type 2017-09-12 17:00:38 +02:00
Max Kellermann
988680de33 util/StringView: remove unnecessary operator= overloads
These will be generated by the compiler automatically.
2017-09-12 17:00:02 +02:00
Max Kellermann
cdf92c6300 util/StringView: remove redundant template parameters 2017-09-12 16:57:19 +02:00
Max Kellermann
be5b726c0a util/StringView: remove Literal()
This is not necessary, because a strlen() on a literal gets optimized
away by the compiler.
2017-09-12 16:55:10 +02:00
Max Kellermann
fe9ffcb9d2 Merge branch 'v0.20.x' 2017-08-08 19:30:30 +02:00
Max Kellermann
a4019cb6aa util/StringBuffer: use std::array::const_iterator 2017-08-07 16:18:43 +02:00
Max Kellermann
b0703b92c3 util/FormatString: pass the allocated buffer to AllocatedString::Donate()
.. and not the stack buffer.  This made the AllocatedString destructor
crash.

Closes #52
2017-08-03 00:25:30 +02:00
Max Kellermann
501a4af914 util/StringUtil: move strip functions to StringStrip.cxx 2017-07-05 17:20:02 +02:00
Max Kellermann
dad7d7e798 util/TruncateString: rename CopyString() to CopyTruncateString() 2017-07-05 17:15:58 +02:00
Max Kellermann
4b94ae8040 util/StringUtil: move CopyString() to TruncateString.cxx 2017-07-05 17:11:34 +02:00
Max Kellermann
b04679b429 util/WritableBuffer: add method MoveFront() 2017-07-05 17:10:59 +02:00
Max Kellermann
19358d1c42 util/Exception: add more utility functions 2017-07-05 17:08:26 +02:00
Max Kellermann
8679074be7 util/Exception: move code to AppendNestedMessage() 2017-07-05 17:07:43 +02:00
Max Kellermann
ba09e22c30 util/Exception: add GetFullMessage(std::exception) 2017-07-05 17:07:41 +02:00
Max Kellermann
6515b9727d util/Exception: catch std::nested_exception 2017-07-05 17:07:40 +02:00
Max Kellermann
4af8e5bdb5 util/Exception: include cleanup 2017-07-05 17:07:39 +02:00
Max Kellermann
2db8cf477b util/Exception: add "fallback" and "separator" parameters 2017-07-05 16:59:40 +02:00
Max Kellermann
3cfefa53f7 util/Exception: rename FullMessage() to GetFullMessage() 2017-07-05 12:25:55 +02:00
Max Kellermann
bce89feb13 util/Manual: drop prefix from include guard 2017-07-05 12:25:32 +02:00
Max Kellermann
88f5220acf util/Manual: drop support for gcc 4.6 2017-07-05 12:25:20 +02:00
Max Kellermann
3e87ac75a1 util/Manual: use C++11 initializer 2017-07-05 12:12:41 +02:00
Max Kellermann
9237f2a80c util/{Const,Writable}Buffer: add array constructor 2017-07-05 12:09:27 +02:00
Max Kellermann
61aca389c4 util/{Const,Writable}Buffer: add typedef value_type 2017-07-05 12:08:34 +02:00
Max Kellermann
80438c4876 util/BindMethod: add BIND_FUNCTION() 2017-07-05 12:04:29 +02:00
Max Kellermann
70ac4fa96b util/AllocatedString: implement AllocatedString<wchar_t>::Duplicate() 2017-07-05 10:26:39 +02:00
Max Kellermann
979f1b6c39 release v0.20.9
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkz5jkQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEubuD/kBXMcV4XawqGNNtSHdrY8CxSL8wJMCMJQl
 aMgRkKLPRml8Hj9FNNG9pjXBuT+qUgPX7t9gBEiT7c+sV3fHH40gUf1js5GIsEPm
 BAVfvww5EhmQWWVhPTLk1iZ4jp6E96mDmIG1znwo7etSZHXU8RJfR7woBi3SPJ9f
 OPcrimskNuWpAWeaEIKi/1Iwzy8d9VK9Ttb73gA3M5zSm7ioXzt3YClpwLRM8JU6
 QeUJchy6VwXnygswjUNmbhPc3GsD2FyUZ4OtJ0hodnqqajfldBxhcHUnQk4zZULr
 1nLSyOuA9bwLuFohH1T6HiY9z8PFzgqdIHvsjOJgZ4gQa69PVNjal2tUEUav9zFv
 aK4LvTVPnIk+hqRbtLpV7/rPKuClrC9BO4oYdBGBDNY4hqVpvRA9obP1s00aOi+K
 UhYqLqg7yeIEeTlUxFOhXJCKAEL69BuXT5ihJtDlB/dCUzv37sEch/4WDgs7uc+O
 9kJYlElvozw57mbczsee/PCSnSWrLCq/qG/bNEUUQOTueWNuifh3PL62UXGgfbEH
 01hJDyLr6ETSmWn7rjTfLJiHThX/EQQvOhs+35fbCyry65z4tFwrilGDmFVUWGPq
 /6QEpY1D6q4fkoma/iWOZoTkfKewatAPGMGWoJaGhCnfQFz4VTFtS2bDtuUctQ16
 jnXnPFxqBw==
 =0SSp
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.9'

release v0.20.9
2017-06-04 12:57:05 +02:00
Max Kellermann
a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +02:00
Max Kellermann
cdd2d4cc1d util/StringView: add method EndsWith() 2017-05-17 12:39:01 +02:00
Max Kellermann
907fb257cd util/StringAPI: add StringToken(), StringIsEqualIgnoreCase(), StringCollate() 2017-05-16 23:04:27 +02:00
Max Kellermann
60bd60db03 util/String{Compare,API}: add more "noexcept" 2017-05-16 23:02:36 +02:00
Max Kellermann
0fcc28a108 util/String{Compare,API}: indent with tabs 2017-05-16 23:01:43 +02:00
Max Kellermann
ab8005f03e util/ScopeExit: include cleanup 2017-05-16 22:56:30 +02:00
Max Kellermann
5e8f578e78 util/ConcatString: return the end pointer 2017-05-16 11:56:56 +02:00
Max Kellermann
a4b1633e11 util/ConcatString: use std::copy_n() instead of memcpy() 2017-05-16 11:56:19 +02:00
Max Kellermann
fea211a109 util/Alloc: move template functions to ConcatString.hxx 2017-05-16 11:32:55 +02:00
Max Kellermann
59e4f1ee0f *: remove lots of GCC 4.8 fallback code
We can remove those C++11 and C++14 kludges because we require GCC 4.9
now.
2017-05-16 11:29:15 +02:00
Max Kellermann
86a0a42a8d util/StringView: add "noexcept" 2017-05-16 10:27:14 +02:00
Max Kellermann
662842126d util/SplitString: add "noexcept" 2017-05-16 10:23:50 +02:00
Max Kellermann
66e3801b1e util/MimeType: add "noexcept" 2017-05-16 10:23:38 +02:00
Max Kellermann
a30cf60422 util/FormatString: add "noexcept" 2017-05-16 10:22:52 +02:00
Max Kellermann
c2b8b818c7 util/DivideString: add "noexcept" 2017-05-16 10:22:36 +02:00
Max Kellermann
4284b0e2b8 util/ByteReverse: add "noexcept" 2017-05-16 10:21:59 +02:00
Max Kellermann
9def9b35b9 util/Exception: add "noexcept" 2017-05-16 10:20:17 +02:00
Max Kellermann
4faef28cc5 release v0.20.7
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlkaFL0QHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEr4ID/9iAQC+7fFv06uLOm48Ufu+PgoD8uJkAwF5
 QuLQkc85g9urn+bu9N7Qs7Vypp7aLyGcJKY0jyA8wxkOj24pUC3GYk80daUt561V
 5s20FnoS/Uoman3CSJL94IfCUBxejizE6vgIIHTc5bb6U0qIsPub/8JTTE2Ih7uP
 nvFZ5uBQ+YTc7at+iIH9123eUMKkitkh8osNblovqQT9v42++Tm4ztAytRHBjwUA
 Itew5HhlvahbLKqFs/7vmICh/YX1FcOV7cV+erEWYfkH0KCI2bhSle4u2d0CBOvD
 VJlDnBCo9bM7WKcPYqJiFFFXA0CRk06wbkkkAtwF4zjp8xos7aQcq4FyQnYL8KXo
 5lijIhRwBURBd+nt8oA9kuEhBt/T75otcemJkzVaYappHTJCLjhxSGcPt8mw+nE9
 9WQzsp/MIVzg9l5g3D9S/43xM7uhvn98Tn1Qf2s8YRd2o8CZeOhW+X3RvbCvVPv2
 mOlx4sFAv8DOJ3KxMdqiJT+PmylPyJluQdqH+tMc8BdPg/kpSpYIPTuSjjRqK1yh
 ld5do0HtAAwiHtvXfk5YVFjJSpO0c8yVn6xci2Cl4k/5ZHj2UE1ln+N5vCea2BRF
 2J3HAjROwtcwY3lU1jFnEAogf24KWiFJqhhC0EqBGUdlrM8Dn37P5cEWWjROIMNK
 lPEdovokNw==
 =CdDy
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.7'

release v0.20.7
2017-05-15 23:01:49 +02:00
Max Kellermann
788e3b31e1 *: remove "pure" and "const" attributes from throwing functions
The "pure" and "const" attributes are not so well-defined, and a
recent clang version implements an optimization which pushes the
definition's boundary beyond what I believed it was.  clang now
assumes that functions declared "pure" cannot throw exceptions, even
if they lack the "noexcept" specification.

When compiled with this new clang version, MPD will crash randomly if
an exception happens to get thrown by such as "pure" function
(https://github.com/MusicPlayerDaemon/MPD/issues/41).

This commit removes all such misplaced "pure" and "const" attributes,
closing #41.
2017-05-08 17:25:06 +02:00
Max Kellermann
71f0ed8b74 *: add "noexcept" to many, many function prototypes
This eliminates some overhead, because the compiler doesn't need to
consider these functions throwing.
2017-05-08 14:44:49 +02:00
Max Kellermann
d68772d45a util/{Foreign,Static}FifoBuffer: update API documentation 2017-04-24 20:19:14 +02:00
Max Kellermann
52cb425e33 util/StaticFifoBuffer: add method GetCapacity() 2017-04-24 20:18:44 +02:00
Max Kellermann
ed3220f37f util/{Foreign,Static}FifoBuffer: use C++11 initializers 2017-04-24 20:16:18 +02:00
Max Kellermann
f6e428ac22 Merge branch 'v0.20.x' 2017-04-24 11:44:27 +02:00
Max Kellermann
38da76bbe0 util/ScopeExit: copy enabled tag in move constructor 2017-04-12 13:11:43 +02:00
Max Kellermann
e26d49efb7 release v0.20.6
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAljCzQcQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEnIXD/9ltsmg3VC81NHOmcUehFgUaLyNh8o2iEr9
 tQfdydQxfTXBIGztMoPsPz71da8BIqAgMTCTGAEpTUXIW6ViGkgsoDlR2fAOagG2
 ybHn2q3WsPERJvkGZ4xIo0ti0pLLy7wrFpmShgOKuwb6YqOgSV+rbu/CaQanxVJE
 S599vo6rV/OI4KFSYWJbfafifN/Mqmzfl/D/tB5xaMvhas60XZ6pZTp/xH8OlnML
 8qkgPmN3gJe7DPq6L3rdwKobJuS1X6NLHSp1DyGVRy68B0sd3tMmbOocMeyi1OlE
 1z/n/M+dcSUhdHAh/Pg0wrvH0UpUlJ11blSDiWB9gqr9oOvCZO+OcPCnk0QJrqq+
 qselDNWBLvVPESbxlPO4OUbV6jxPPhVgz18RYl6JaJeUFjXkuiytI/t6jsbVM3+f
 ZC1UgO+TznCuDjjMj35RP9QDkUQpuH6CK4+tyxbH7Fe4KQi02FQdtK8Q/CnESBLl
 alTLYQk7VlwL1oMgezoZfTLDbsihRrEO6Y0cp/pObUrEjQ65706UGUf61PRQGBM9
 DlEPqfuH8TMgksxDIrkt68pWjyCXhhUCA+RsyFJoMp7Xq6Gy2pZUn2yKCmTXLte/
 v5xW9FuiSvKUKlvYbfk/q3u/GTCJELf0eY3y0Eryqp6nOEZHmzz8HOF7Bs2PxM3B
 eU/fEKWxVQ==
 =21bM
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.6'

release v0.20.6
2017-03-10 17:02:32 +01:00
Max Kellermann
42a3a87f13 util/HugeAllocator: paranoid check for sysconf()<0
Just in case.
2017-03-01 21:50:26 +01:00
Ben Boeckel
9dfedbe619 ReusableArray: fix build error on GCC7
GCC7 outputs the following error without this change:

    src/util/ReusableArray.hxx:61:35: error: no matching function for call to ‘swap(size_t&, const size_t&)’
       std::swap(capacity, src.capacity);

which can be resolved by just using an rvalue-reference rather than a
const rvalue-reference.

Signed-off-by: Ben Boeckel <mathstuf@gmail.com>
2017-03-01 19:38:41 +01:00
Max Kellermann
29d03ab937 release v0.20.5
-----BEGIN PGP SIGNATURE-----
 
 iQJEBAABCAAuFiEEA5IzWngIOJSkMBxDI26KWMbbRRIFAlirVtMQHG1heEBtdXNp
 Y3BkLm9yZwAKCRAjbopYxttFEgbaD/9tgcgcnbiWGkNDMf0qfqfaiY80wA4HbSBT
 qbKzan/kuiPXL6xcgw8YRYdAjyaIyw//f1q0SL8/LKvVQ4CrlTEQzOQUzrAOe02n
 m35/6YKZVzziMRwuSZY4oQ4WH7SE87gthYIykRt59adznr2QNtQe53SnXd8ukGtf
 l8xlLNuIiEwIo5PZ8ObEZH1dUP1PWtfJlxQfbJ2JhZTOR/qPfrpIzSK4GVY0ZXdz
 EO6BIZyDgPfeZCPBZqiKmw4vcdIHBhG9ZgtOhX3YATV7ZSYqmjrUcjzEsoyQlOaH
 rhe/whl272TQYdj95//BnqI899NVSNRYg6XXGlCB5TXqFscoDCW6JXvVAaTfB0Yg
 vMV7ZYX8auu2i013O51yoj8/ofNmOjqbX9eui+gJx6Xb6Zr9Ttma5woYRh14NXwd
 15KObGCd1LADpiOZ2XQ8Snlu8QlZ+PXr8RpLh9uSwDe7heemMRKqDZEf3AxfP3wO
 GUOK4EHfZ5kZQHlWLA3u59Zopo1ZJjL6EJUTG3Qk+n/Wob/S2F/v5IFIdyaEFTKI
 hrcTEQ/EmXZ9vc5Iw/LnIM49pO3kZXKQ9bSrZoi0kjk2AN6XBMmJNoYv/+huc2U9
 JiCcyM8olCWcSQnPGjoHWxBGLhxNXtR+WYu/tEEq3+D2PFdkfOap3ApP1qdi+JPd
 JFps/sOkgQ==
 =4+OJ
 -----END PGP SIGNATURE-----

Merge tag 'v0.20.5'

release v0.20.5
2017-02-20 21:59:40 +01:00
Max Kellermann
bc1c927952 util/TimeFormat: suppress -Wunused on Windows 2017-02-20 21:44:01 +01:00
Max Kellermann
4146475c73 util/ChronoUtil: new utility library for std::chrono 2017-02-11 22:23:33 +01:00
Thomas Zander
51147203be free() require cstdlib to be included 2017-01-31 21:21:37 +01:00
Max Kellermann
4f01387edf util/StringBuffer: new utility class 2017-01-17 22:03:42 +01:00
Max Kellermann
6eea56861b AUTHORS, ...: update my email address 2017-01-17 11:54:55 +01:00
Max Kellermann
d842d21be0 util/ReusableArray: add method GetCapacity() 2017-01-11 20:37:12 +01:00
Max Kellermann
3514fd2433 util/ReusableArray: add move constructor/operator 2017-01-11 20:37:12 +01:00
Max Kellermann
6778ff27ea util/ReusableArray: use C++11 initializers 2017-01-11 20:33:01 +01:00
Max Kellermann
6c6947b01f util/UriUtil: add uri_get_path() 2017-01-08 11:05:58 +01:00
Max Kellermann
44493ca0c4 util/TimeParser: add "pure" attribute 2017-01-08 10:41:08 +01:00
Max Kellermann
42acf78b09 util/TimeParser: wrapper for strptime()
Move code from SongFilter.cxx.
2017-01-07 22:11:45 +01:00
Max Kellermann
a34dfd55be util/HugeAllocator: remove deprepcated dynamic exception specifications 2017-01-04 10:32:21 +01:00
Max Kellermann
5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann
52652cb609 command/{Player,Error}: extract messages from nested exceptions 2016-12-29 14:46:13 +01:00
Max Kellermann
219a756abc Compiler.h: drop gcc_alignas(), use plain C++11 alignas() 2016-11-18 08:56:16 +01:00
Max Kellermann
2f76f9da89 configure.ac: enable C++14 2016-11-18 08:41:47 +01:00
Max Kellermann
22dcca9832 util/Error: remove obsolete class 2016-11-10 12:58:26 +01:00
Max Kellermann
06909f4f00 util/Error: remove explicit move constructor, allow copying
The C++ compiler will auto-generate move and copy
constructors/operators for us.
2016-09-08 10:34:02 +02:00
Max Kellermann
87e0459fcc util/WritableBuffer: add method skip_front() 2016-08-16 08:46:30 +02:00
Max Kellermann
c3d9c32615 util/BindMethod: add nullptr constructor and bool operator 2016-06-20 10:36:37 +02:00
Max Kellermann
a938b609b9 util/BindMethod: document the default constructor 2016-06-20 10:36:09 +02:00
Max Kellermann
863f4d8366 util/BindMethod: new utility class for callbacks
Replaces the old BoundMethod template.
2016-06-17 18:20:19 +02:00
Max Kellermann
91769d536d util/HugeAllocator: add class HugeAllocation 2016-06-17 18:01:13 +02:00
Max Kellermann
9500343d85 util/HugeAllocator: add "noexcept" 2016-06-17 17:59:45 +02:00
Max Kellermann
ef053035d0 util/HugeAllocator: throw std::bad_alloc on error 2016-06-17 17:57:40 +02:00
Lazaros Koromilas
b2b7974ba0 util/WStringAPI: wcpcpy(3) is not yet supported on OpenBSD/NetBSD
Signed-off-by: Lazaros Koromilas <lostd@2f30.org>
2016-06-12 16:36:17 +02:00
Max Kellermann
287ef181ba util/MimeType: add ParseMimeTypeParameters() 2016-06-10 22:52:35 +02:00
Max Kellermann
92cdea123e TagStream, decoder/Thread, ...: ignore MIME type parameters for matching plugins 2016-06-10 22:24:13 +02:00
Max Kellermann
e4c7e343c8 util/StringUtil: use CamelCase 2016-06-10 22:08:13 +02:00
Max Kellermann
a67b7266ed util/AllocatedString: work around bogus gcc6 warning 2016-05-11 17:10:15 +02:00
Max Kellermann
8ba3378096 util/AllocatedString: add operator==(nullptr) 2016-04-13 12:23:10 +02:00
Max Kellermann
6a1f5667f9 util/FormatString: return AllocatedString 2016-04-12 22:59:23 +02:00
Max Kellermann
fab5f58ee0 util/AllocatedString: add operator[] 2016-04-12 22:57:13 +02:00
Max Kellermann
55be8e6f52 util/AllocatedString: add typedef size_type 2016-04-12 22:56:57 +02:00
Max Kellermann
c75b9b0d12 util/StringPointer: add typedef reference_type 2016-04-12 22:55:12 +02:00
Max Kellermann
9b85446808 util/StringPointer: rename typedef pointer to pointer_type 2016-04-12 22:53:06 +02:00
Max Kellermann
60f32d0bce util/AllocatedArray: new utility class 2016-04-12 21:32:56 +02:00
Max Kellermann
b1becddf11 util/StringView: add method Strip() 2016-03-18 15:40:49 +01:00
Max Kellermann
667edcd9d0 util/IterableSplitString: cheaper variant of SplitString() 2016-03-18 14:11:50 +01:00
Max Kellermann
b4e75bedf0 util/StringView: make nullptr_t constructor "constexpr" 2016-03-18 14:11:50 +01:00
Max Kellermann
5482ef5451 util/SplitString: relicense to BSD-2 2016-03-18 13:18:31 +01:00
Max Kellermann
a7c68018a2 util/Callback: new utility class for callback functions 2016-03-10 20:42:19 +01:00
Max Kellermann
6ff01cc72c Merge branch 'v0.19.x' 2016-03-07 14:30:43 +01:00
Max Kellermann
13f9f0315f util/HugeAllocator: fix division by zero due to inverted check
There were two ways this could fail:

1. division by zero when sysconf(_SC_PAGESIZE)==0

2. mmap() failure because the size parameter is not aligned to page
   size

Neither ever happened: sysconf() never fails, and the only caller
passes a size that is already aligned.  Phew.
2016-03-06 23:53:41 +01:00
Max Kellermann
1aee89f5ea *: include cleanup (using iwyu) 2016-03-01 22:08:13 +01:00
Max Kellermann
1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann
d9e8ce22cb util/Error: use std::exception_ptr instead of std::exception
Necessary to preserve type information.  The try/catch sequence didn't
work previously.

Same fix as in commit 1c904000
2016-02-26 16:32:24 +01:00
Max Kellermann
8610eb84c6 util/RuntimeError: add missing include 2016-02-07 12:53:21 +01:00
Max Kellermann
bc2d23ff0d util/ScopeExit: new utility library
Similar to boost::scope_exit, but fewer include dependencies.
2016-02-06 22:03:37 +01:00
Max Kellermann
1098d271b8 util/Error: add bridge to std::exception 2015-12-18 00:24:43 +01:00
Max Kellermann
51168169e7 util/Tokenizer: use std::runtime_error on syntax error 2015-12-16 11:34:26 +01:00
Max Kellermann
d256a0e98f config/ConfigFile: use std::exception on syntax error 2015-12-16 11:13:16 +01:00
Max Kellermann
a944927b56 util/StringPointer: add method empty() 2015-11-11 15:13:46 +01:00
Max Kellermann
b9a8b0d146 util/StringView: add method Literal() 2015-11-06 10:03:45 +01:00
Max Kellermann
4d15db0134 util/StringCompare: use StringView to simplify inline implementations 2015-11-06 10:03:14 +01:00
Max Kellermann
75d46efd23 util/UriUtil: use StringAfterPrefix() instead of memcmp() 2015-11-06 09:49:22 +01:00