Commit Graph

48 Commits

Author SHA1 Message Date
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 a057b4f6d8 *: add lost of "noexcept" specifications 2017-06-04 12:46:48 +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 5900253b85 update copyright year 2017-01-03 20:48:59 +01:00
Max Kellermann b042095ac2 event/Loop: use std::chrono 2016-12-28 01:15:08 +01:00
Max Kellermann e2b7c30811 event/BufferedSocket: pass std::exception_ptr to OnSocketError() 2016-11-02 10:38:05 +01:00
Max Kellermann 31faafea9d Client: remove the AllowFile() overload with Error parameter
Unused.
2016-10-27 22:16:05 +02:00
Max Kellermann 726fc53e62 Client: add AllowFile() overload which throws exception 2016-10-27 22:04:38 +02:00
Max Kellermann 8d41e9658f Instance: remove Error parameter from GetDatabase() 2016-10-26 18:52:00 +02:00
Max Kellermann 086652dd50 Instance: add GetDatabaseOrThrow() 2016-10-26 18:47:19 +02:00
Max Kellermann b67e7df38e Merge tag 'v0.19.17'
release v0.19.17
2016-07-09 00:46:09 +02:00
Max Kellermann e6389ff5a1 client/ClientRead: call Break() before Close()
Referencing the attribute "partition" is illegal after Close(),
because Close() deletes "this".
2016-07-07 13:54:04 +02:00
Max Kellermann 6a1f5667f9 util/FormatString: return AllocatedString 2016-04-12 22:59:23 +02:00
Max Kellermann fd5d42836f Client: add WriteString() 2016-04-12 22:32:38 +02:00
Max Kellermann b27fb64317 client/ClientRead: use Instance::Shutdown() 2016-03-05 20:19:20 +01:00
Max Kellermann b24a5e0662 Partition: add method EmitIdle()
Prepare for moving idle events to class Partition.  Right now, it's
just a wrapper for idle_add().
2016-03-05 19:16:39 +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 8d23706354 util/DeleteDisposer: new utility class 2015-10-19 15:57:30 +02:00
Max Kellermann 36cd73df51 client, command: use StringIsEqual() 2015-08-14 19:48:30 +02: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 6cce3d2996 ClientWrite: merge client_write() into Client::Write() 2015-08-06 10:36:24 +02:00
Max Kellermann 77b34fa961 Client: include cleanup 2015-08-06 10:32:18 +02:00
Max Kellermann 83752e9349 net/ToString: rename sockaddr_to_string() to ToString() 2015-07-22 10:26:18 +02:00
Max Kellermann 6f22452b54 net/Resolver: move sockaddr_to_string() to ToString.cxx 2015-07-22 10:03:36 +02:00
Max Kellermann 1c90b0c19d *: change C-style prototypes, drop "(void)" 2015-03-03 20:05:08 +01:00
Max Kellermann 90a61b6bab fs/FileInfo: new library providing GetFileInfo()
Replaces StatFile(), with a portable data object.
2015-02-28 23:00:26 +01:00
Max Kellermann 4e30e74739 net/SocketAddress: light wrapper for struct sockaddr 2015-02-10 22:06:06 +01:00
Max Kellermann 42890b9acf system/{Resolver,Socket{Error,Util}}: move to new library libnet.a 2015-02-10 22:06:06 +01:00
Max Kellermann ae7e1a22cb Merge branch 'v0.19.x' 2015-01-26 20:57:29 +01:00
Max Kellermann a289dcb9ee Merge branch 'v0.18.x' into v0.19.x 2015-01-26 20:48:19 +01:00
Max Kellermann 1c3f5517fa config/Option: convert to strictly-typed enum 2015-01-21 23:30:00 +01:00
Max Kellermann 712ed555e6 Copyright year 2015 2015-01-01 19:48:13 +01:00
Max Kellermann dc03f003ac Merge tag 'v0.18.18' into v0.19.x 2014-11-18 21:38:44 +01:00
Max Kellermann 59d38f876a util/StringUtil: add StripRight() overload with "end" argument 2014-08-07 16:08:02 +02:00
Max Kellermann db6db51742 util/CharUtil: add IsWhitespaceFast() 2014-08-07 16:08:02 +02:00
Max Kellermann 3364c1b893 ClientList: use class boost::intrusive::list
Eliminate extra allocations for the std::list node instances.
2014-06-11 09:27:17 +02:00
Max Kellermann 507d8fdc6f ClientList: add typedef List 2014-06-10 23:21:09 +02:00
Max Kellermann c13810ebaa Mapper: move map_song_detach() to db/DatabaseSong.cxx
Use Storage::MapUTF8() internally, don't use global variables.
2014-02-07 00:42:14 +01:00
Max Kellermann d380db25be Instance: add attribute "event_loop"
Replaces global variable "main_loop".
2014-02-05 00:09:36 +01:00
Max Kellermann 2de7cd32ea ClientMessage: undefine GetMessage on WIN32 2014-02-04 11:35:14 +01:00
Max Kellermann cf6281a5a7 Instance: add Database attribute
Move from db/DatabaseGlue.cxx, eliminating global variable.
2014-02-04 11:22:33 +01:00
Max Kellermann a8e52ad89f ClientFile: move client_allow_file() into the Client class 2014-02-02 13:59:07 +01:00
Max Kellermann e199c33c6e Client*: move to client/ 2014-01-24 00:26:53 +01:00