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
5900253b85
update copyright year
2017-01-03 20:48:59 +01:00
Max Kellermann
6ff01cc72c
Merge branch 'v0.19.x'
2016-03-07 14:30:43 +01:00
Max Kellermann
1532ffe215
protocol/ArgParser: fix range check
...
The old check
unsigned(value) > std::numeric_limits<unsigned>::max()
.. cannot ever fail.
2016-03-06 23:41:08 +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
e939d667d9
protocol/Ack: add exception class wrapping enum ack
2015-12-18 09:53:02 +01:00
Max Kellermann
8e408725e9
protocol/Result: move current_command to class Response
2015-08-14 19:04:00 +02:00
Max Kellermann
d053797340
protocol/Result: move command_list_num to class Response
2015-08-14 19:00:02 +02:00
Max Kellermann
c8d0f947d2
protocol/Result: move error code to class Response
2015-08-14 18:57:44 +02:00
Max Kellermann
7652a2986b
client/Response: new Client wrapper class for writing responses
2015-08-12 08:41:05 +02:00
Max Kellermann
b1480167be
command/Request: add parser methods
...
Wrapper for protocol/ArgParser.cxx.
2015-08-11 23:02:34 +02:00
Max Kellermann
e118e958f7
protocol/ArgParser: add overload with max_value parameter
2015-08-11 22:58:04 +02:00
Max Kellermann
ee61dfe087
protocol/ArgParser: use std::numeric_limits
...
Using unsigned(-1) renders undefined behavior.
2015-08-11 22:57:47 +02:00
Max Kellermann
9231f420c1
protocol/ArgParser: overload as ParseCommandArg(), pass references
2015-08-11 22:43:10 +02:00
Max Kellermann
cbdc3194cc
protocol/ArgParser: add struct RangeArg
2015-08-11 22:43:10 +02:00
Max Kellermann
712ed555e6
Copyright year 2015
2015-01-01 19:48:13 +01:00
Max Kellermann
a464dc681a
release v0.18.14
...
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1
iQIcBAABAgAGBQJUEdhhAAoJECNuiljG20USwKkP/1MIm6J2ydXEP81RD/3llz6h
2t8EK94cEIdb6bA6goBI0Pipz7YAtmjgfnDRW90AvFcxNuVt87esxG82gVOiosvo
7LByehQ2kq/w0evILWy8X1eAvqIk/PvG6T/pZcPrrj7kHrZaIOXh0SVTZ5NLq7HC
drunwHQxgVntB/410h7BKEFbg1qWHPGxfTyf6qJsZPkHfr5QcgbHrYN7QCr1eUv9
mARx4Nxo9MXuiqOJOS7ck80V68nbnFdxjNXSflUkl94O0MfiPc741Snbe7qnHI91
I+BQYCBExKzoqFszuuRZQjxFpJalg4Y/9/stn6+dYemtC3WpreGHogweUBlPZ5if
wJRL/A/zHAY0xE/hohiEqY6pHZWmVolbumtp7LfNR7dejOetn0IPW+KnFnjYec21
qkJG/mq8fHStdQMTzp5NDoqh8VrPaBAAhjgP3suZY2wZ5xfbLXHk/HNKdQLvX8s3
Vv4wcDNsfbOJ/1ZTBo/nqceTkOyHrov5cDSotYnO1hs963vyk3LFwY2IRCgPdOR0
7o77JmKHZnzZSw60CIT6Mf1+rx38x++Rq3UGDYuH4B4L4VqXv2WrUp32w1VzHQVO
Dcd/dxwW/sB1SwMdi5J4tIBJCSn5mF7yvBPR0PB5NiZiX1YB6hEqmaXYfwLCqujo
xyWy8gPJbmYw6XJPmw6A
=3azu
-----END PGP SIGNATURE-----
Merge tag 'v0.18.14'
2014-09-11 19:26:58 +02:00
Max Kellermann
421c4ae907
protocol/ArgParser: fix integer overflow in parse_range()
...
Casting std::numeric_limits<unsigned>::max() to "long" leads to an
overflow if sizeof(unsigned)==sizeof(long), and the result will be -1.
This happens on some 32 bit architectures, for example ARM and WIN32.
Workaround: use std::numeric_limits<int>::max(), which is the largest
signed integer. Since sizeof(long)>=sizeof(int), this will never
overflow.
Fixes Mantis ticket 0004080.
2014-09-04 17:37:31 +02:00
Max Kellermann
d5287682d1
ArgParser: allow fractional seconds in ParseCommandArg(SongTime)
2014-08-29 23:46:38 +02:00
Max Kellermann
3952920492
Playlist: use std::chrono::duration for Seek*()
2014-08-28 06:42:19 +02:00
Max Kellermann
e199c33c6e
Client*: move to client/
2014-01-24 00:26:53 +01:00
Max Kellermann
4f83c60296
copyright year 2014
2014-01-13 22:31:55 +01:00
Max Kellermann
8555b65c50
*: update copyright year to 2013
2013-10-30 23:37:06 +01:00
Max Kellermann
20597b3632
*: use nullptr instead of NULL
2013-10-28 23:58:17 +01:00
Max Kellermann
ff626ac763
*: use references instead of pointers
2013-10-19 18:48:38 +02:00
Max Kellermann
58502b38d3
*: use std::numeric_limits
2013-10-17 21:53:19 +02:00
Max Kellermann
be2951b45f
gcc.h: rename to Compiler.h
2013-10-15 09:21:59 +02:00
Max Kellermann
1dd1a705b5
gcc.h: major update
...
Copy the according file from another project (i.e. XCSoar). This will
allow copying more code more easily.
2013-10-15 09:13:22 +02:00
Max Kellermann
29030b54c9
util/Error: new error passing library
...
Replaces GLib's GError.
2013-09-04 18:14:22 +02:00
Max Kellermann
7f0ce4e94e
ack.h: move to protocol/
2013-08-10 19:32:41 +02:00
Max Kellermann
28030d7edb
include cleanup
2013-07-30 08:39:21 +02:00
Max Kellermann
214a526945
Merge branch 'v0.17.x'
2013-02-19 09:24:11 +01:00
Jörg Thalheim
d5b756413a
command: allow to omit END in ranges (START:END)
...
If END is omitted, mpd should use the highest possible value instead of raising an error.
This partially reverts 52e9cab1c1
2013-02-19 09:23:18 +01:00
Max Kellermann
7a982169c9
Client: rename the struct client to class Client
2013-01-03 17:36:28 +01:00
Max Kellermann
70b87f2eb6
client: convert to C++
2013-01-03 11:16:18 +01:00
Max Kellermann
8e331cfc65
gcc.h: re-add gcc_const and gcc_pure
...
Remove GLib dependency from some headers.
2012-08-02 19:12:18 +02:00
Max Kellermann
ae28ba84d2
command: move code to protocol/argparser.c
2012-02-14 19:13:04 +01:00
Max Kellermann
b8ed420058
command: move functions to protocol/result.c
2012-02-14 18:57:29 +01:00