Commit Graph

27 Commits

Author SHA1 Message Date
Max Kellermann cc0def15c4 Copyright year 2022 2022-07-14 17:59:35 +02:00
Max Kellermann ae4f4d3533 config/Data: add WithEach(ConfigBlockOption)
To improve error messages without making callers more complex.
2022-07-13 11:05:21 +02:00
Max Kellermann 5348f8c9c8 copyright year 2021 2021-01-01 19:54:28 +01:00
Max Kellermann ab318200db config/{Data,Block}: use With() in GetUnsigned(), GetPositive() 2020-10-08 20:21:09 +02:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann d663f81420 include cleanups (powered by iwyu) 2019-07-05 09:59:58 +02:00
Max Kellermann a139279575 Copyright year 2019 2019-06-17 11:17:30 +02:00
Max Kellermann af7970337b config/Parser: get_bool() throws on error 2019-05-29 22:35:40 +02:00
Max Kellermann ece35552fe config/Block: add ThrowWithNested() 2019-05-29 22:33:51 +02:00
Max Kellermann ce49d99c2f check.h: remove obsolete header
Since we switched from autotools to Meson in commit
94592c1406, we don't need to include
`config.h` early to properly enable large file support.  Meson passes
the required macros on the compiler command line instead of defining
them in `config.h`.

This means we can include `config.h` at any time, whenever we want to
check its macros, and there are no ordering constraints.
2018-11-19 16:33:49 +01:00
Max Kellermann f5c9071494 *: copyright year 2018 2018-10-31 17:54:59 +01:00
Max Kellermann 9ff2606bb8 config/Data: use std::forward_list to manage params and blocks 2018-07-18 11:03:19 +02:00
Max Kellermann 8af75c78f8 config/{Global,Block}: throw exception on parser error 2018-07-17 22:23:04 +02:00
Max Kellermann 816603fd9a config/Config*: rename files, drop "Config" prefix 2018-07-16 19:50:07 +02:00
Max Kellermann bbc5212436 fs/AllocatedPath: make the nullptr_t constructor public 2018-01-17 12:17:41 +01:00
Max Kellermann be65c7d5d0 config/Block: add method GetPositiveValue()
Adds missing checks to several plugins.
2018-01-02 17:24:34 +01:00
Max Kellermann 7c5306a841 config/{Block,Global}: add missing strtoul() check 2018-01-02 17:23:10 +01: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 4aab97ccb1 config/Path: throw std::runtime_error on error 2016-11-07 09:07:50 +01:00
Max Kellermann e17805f208 config/Block: GetPath() throws exception on error 2016-10-28 23:08:42 +02:00
Max Kellermann d8bcdca55a config/Block: rename GetBlockPath() to GetPath() 2016-10-28 23:07:26 +02:00
Max Kellermann 1d67aa7bf2 update copyright year to 2016 2016-02-26 17:54:05 +01:00
Max Kellermann 4fa5538e2b config/Param: split block-specific attributes to new struct ConfigBlock
The old struct config_param remains only for top-level string options.
2015-01-21 23:56:33 +01:00
Max Kellermann 76b7882f33 ConfigData: rename struct block_param to BlockParam 2015-01-21 21:18:25 +01:00
Max Kellermann bf0ab2d44c ConfigData: move struct block_param to Block.?xx 2015-01-21 20:45:34 +01:00