Commit Graph

777 Commits

Author SHA1 Message Date
Rosen Penev a3963de668 [clang-tidy] change integer prefixes to uppercase
Found with readability-uppercase-literal-suffix

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-04 15:20:50 -08:00
Max Kellermann 7bcccbedad Merge remote-tracking branches 'neheb/bind', 'neheb/move' and 'neheb/str' 2020-02-04 17:03:49 +01:00
Rosen Penev 452c41b71f [clang-tidy] convert several functions to const &
Found with performance-unnecessary-value-param

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-02 13:21:27 -08:00
Max Kellermann 4b0444e760 Merge remote-tracking branches 'neheb/uniq', 'neheb/bool', 'neheb/loop', 'neheb/bool2', 'neheb/perf', 'neheb/void' and 'neheb/value' 2020-02-02 16:22:19 +01:00
Rosen Penev ecad6d936a [clang-tidy] pass by value where appropriate
Found with modernize-pass-by-value

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:53:44 -08:00
Rosen Penev 568deefd68 [clang-tidy] remove pointless void arg
Found with modernize-redundant-void-arg

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:52:38 -08:00
Rosen Penev afb29942b0 [clang-tidy] simplify boolean expressions
Found with readability-simplify-boolean-expr

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:47:47 -08:00
Rosen Penev dfed9546aa [clang-tidy] replace std::bind with lambdas
Found with modernize-avoid-bind

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:43:01 -08:00
Rosen Penev 469cd9582f [clang-tidy] use make_unique
Found with modernize-make-unique

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-02-01 19:40:39 -08:00
Max Kellermann bc6eca2115 *: add explicit 2020-02-01 14:02:43 +01:00
Max Kellermann 72ec641f0d *: use auto 2020-02-01 14:02:43 +01:00
Max Kellermann 4f22f4d357 *: use nullptr instead of NULL 2020-02-01 14:02:43 +01:00
Rosen Penev b64fdae938 [clang-tidy] use override instead of virtual
Found with modernize-use-override

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2020-01-31 21:27:26 -08:00
Max Kellermann cd612c4eef AudioFormat: move to pcm/ 2020-01-18 20:24:59 +01:00
Max Kellermann 7551867249 meson.build: move Log.cxx and LogBackend.cxx into a static library
Prevents compiling those sources many times, once for each debug
program using it.
2020-01-18 19:56:16 +01:00
Max Kellermann 2817bf9e95 copyright year 2020 2020-01-18 19:23:49 +01:00
Max Kellermann e1867a99e9 Merge tag 'v0.21.16'
release v0.21.16
2019-10-16 12:03:12 +02:00
Max Kellermann 23d08820a2 db/update/Walk: fix crash when music_directory is not a directory
Add a runtime sanity check to avoid the assertion failure.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/660
2019-10-07 12:24:25 +02:00
Max Kellermann d63e2c2641 db/update: scan CUE playlist contents
This commit adds a PlaylistPlugin attribute "as_folder" which for now
is only enabled in the "CUE" playlist plugin (which handles separate
"*.cue" files).  If a playlist with this flag set is being scanned
during database update, it will be parsed and its contents will be
added to the database.  This allows clients to inspect them like
directories and its contents will be searchable.

Closes https://github.com/MusicPlayerDaemon/MPD/issues/39
2019-09-08 00:39:53 +02:00
Max Kellermann 5fdb804a50 db/simple/Song: add attribute "target"
Will be used for Song objects representing tracks inside a CUE file.
2019-09-08 00:32:16 +02:00
Max Kellermann 91c1274ac6 db/Song: translate relative "real_uri" paths 2019-09-08 00:31:10 +02:00
Max Kellermann ee36a48dbb db/simple/Directory: RemoveSong() returns SongPtr 2019-09-05 21:12:10 +02:00
Max Kellermann 07f212c98c SongSave: return DetachedSong, not a std::unique_ptr<>
Eliminate unnecessary dynamic allocations.
2019-09-05 20:58:04 +02:00
Max Kellermann 7775691965 db/simple/Song: rename "uri" to "filename"
This attribute is not a URI; it is just the filename without its
parent directory path.  To avoid confusion, let's rename it to
"filename", leaving the struct without a "uri" attribute.
2019-09-04 12:04:35 +02:00
Max Kellermann a727150c8d db/simple/Song: remove StringView constructor 2019-09-04 12:03:56 +02:00
Max Kellermann 949916cba1 db/simple/Song: convert NewFrom() to constructor 2019-09-04 12:03:49 +02:00
Max Kellermann 497d090814 db/simple/Song: remove static method NewFile() 2019-09-04 12:03:41 +02:00
Max Kellermann 6a13847287 db/simple/Song: add template constructor 2019-09-04 12:03:37 +02:00
Max Kellermann cbe7d052e8 db/simple/Song: use PathTraitsUTF8::Build() 2019-09-04 12:02:18 +02:00
Max Kellermann f4d0bd8205 db/simple/Song: make "parent" a reference, not a pointer 2019-09-04 12:02:17 +02:00
Max Kellermann 05a29e8458 db/simple/Song: simplify Export() 2019-09-03 20:36:39 +02:00
Max Kellermann 7f9a8b8748 db/simple/Song: convert "uri" to a std::string
No longer allocate it as a "VarSize".  This used to be a clever trick
to save memory 10 years ago, but these days, keeping the code
maintainable seems more important than saving a few kilobytes of
memory.
2019-09-03 20:26:47 +02:00
Max Kellermann af3f637d3f db/simple/Song: pass StringView to constructor 2019-09-03 20:25:04 +02:00
Max Kellermann 97a9adcbec db/update/Archive: convert pointer to reference 2019-09-03 19:54:18 +02:00
Max Kellermann 177d3b0178 db/update/Archive: use MakeDirectoryIfModified() 2019-09-03 19:52:15 +02:00
Max Kellermann 12beb22c1d db/update/VirtualDirectory: add LockMakeVirtualDirectoryIfModified() 2019-09-03 19:51:20 +02:00
Max Kellermann 29fd3172ee db/update/VirtualDirectory: pass device_id to MakeVirtualDirectoryIfModified() 2019-09-03 19:49:32 +02:00
Max Kellermann a873137702 db/update/VirtualDirectory: rename MakeDirectoryIfModified() 2019-09-03 19:49:10 +02:00
Max Kellermann e08298a66f db/update/Container: move MakeDirectoryIfModified() to VirtualDirectory.cxx 2019-09-03 19:37:53 +02:00
Max Kellermann fd1826cb91 db/update/Container: move SupportsContainerSuffix() to struct DecoderPlugin 2019-09-03 19:36:56 +02:00
Max Kellermann d5681b678c db/update/Walk: move UpdatePlaylistFile() to Playlist.cxx 2019-09-03 18:53:33 +02:00
Max Kellermann 2038620bc4 db/simple/Directory: add method IsReallyAFile() 2019-09-02 20:15:52 +02:00
Max Kellermann 5dc7cb87bb db/simple/DirectorySave: use StringIsEqual() 2019-09-02 20:10:26 +02:00
Max Kellermann 2376527d1f db/DatabaseSong: add noexcept 2019-09-01 14:56:27 +02:00
Max Kellermann 7f043367ed db/UniqueTags: add API documentation 2019-09-01 14:55:25 +02:00
Max Kellermann 45403b44de db/update/ExcludeList: add noexcept 2019-09-01 14:02:34 +02:00
Max Kellermann 32f865f146 db/update/InotifySource: add noexcept 2019-09-01 13:58:45 +02:00
Max Kellermann 9f92b59376 db/update/InotifyQueue: add noexcept 2019-09-01 13:58:22 +02:00
Max Kellermann 2bb5030f70 db/update/Queue: add noexcept 2019-09-01 13:55:17 +02:00
Max Kellermann 366de8773c db/update/Service: add noexcept 2019-09-01 13:51:34 +02:00