Max Kellermann
3c5b864396
tag/IcyMetadataParser: use std::span
2023-12-21 08:42:23 +01:00
Max Kellermann
58fc857a2d
tag/IcyMetadataParser: pass std::string_view to icy_parse_tag()
2023-12-20 20:18:39 +01:00
Max Kellermann
e443ee357a
tag/IcyMetadataParser: do not null-terminate strings in icy_parse_tag()
...
Just pass std::string_views into the unmodified buffer to
icy_parse_tag_item().
2023-12-20 19:58:35 +01:00
Max Kellermann
2618294eb7
tag/IcyMetadataParser: pass std::string_view to icy_parse_tag_item()
2023-12-20 19:51:22 +01:00
Max Kellermann
03352cb4ad
tag/IcyMetadataParser: use std::byte in ParseInPlace()
2023-12-20 19:49:08 +01:00
Max Kellermann
70ac638d93
tag/Mask: make everything constexpr
2023-10-15 11:03:56 +02:00
Max Kellermann
f49d4ef4ad
tag/Mask: switch to 64 bit because have we 34 tags now and 32 bits are not enough
2023-10-08 10:02:50 +02:00
Max Kellermann
2859845567
Merge branch 'v0.23.x'
2023-10-08 10:02:19 +02:00
Max Kellermann
f3c37e484e
tag/Mask: add static_assert on the size of the mask
2023-10-08 10:01:00 +02:00
Max Kellermann
75aa08ed6b
tag/Pool: use a power-of-2 hash table size
...
This is simpler to calculate and the advantage of using a prime is
negligible anyway.
2023-09-11 21:23:11 +02:00
Max Kellermann
c8dc1e0665
tag/Pool: use class IntrusiveHashSet intead of rolling a custom hash table
2023-09-11 21:15:28 +02:00
Max Kellermann
c391adad10
tag/Pool: move code from calc_hash() to util/djb_hash.cxx
2023-09-11 20:53:37 +02:00
Max Kellermann
f578b06d83
tag/Pool: move calc_hash() returns std::size_t
2023-09-11 20:51:44 +02:00
Max Kellermann
0748f75d9b
tag/Pool: rename TagPoolSlot
to TagPoolItem
2023-09-11 20:44:55 +02:00
Max Kellermann
3e09f95b40
tag/Pool: enable option zero_initialized
...
Commit 44beae519d
caused the MPD
executable to grow by more than 1 MB because the `slots` array
suddenly was not zero-initialized anymore, because the doubly-linked
list is circular, while the singly-linked list is zero-terminated.
This option moves the array back to the `bss` section.
2023-09-11 20:32:26 +02:00
Max Kellermann
a573d57de8
tag/Builder: remove unnecessary explicit AddItem() overload
2023-09-06 16:10:31 +02:00
Max Kellermann
44beae519d
tag/Pool: use doubly-linked list
...
This adds some memory overhead but eliminates the linear search from
tag_pool_put_item().
2023-09-06 16:00:25 +02:00
Max Kellermann
b896711fc6
tag/Pool: fix crash in tag_pool_put_item()
...
Regression by commit 76bdfabcc5
2023-09-06 15:53:17 +02:00
Max Kellermann
76bdfabcc5
tag/Pool: use class IntrusiveForwardList
2023-09-06 15:33:26 +02:00
Max Kellermann
6c48f5ac63
tag/Pool: use std::array
2023-09-06 15:10:47 +02:00
jcorporation
082f72dd20
Add support of TAG_MUSICBRAINZ_RELEASEGROUPID
...
Closes #1767
2023-07-12 19:43:37 +02:00
Max Kellermann
42f6a0441c
use [[gnu::...]] attributes
2023-03-06 16:14:15 +01:00
Max Kellermann
7a46c57ef3
tag/Type: require C++
2023-03-06 15:28:44 +01:00
Max Kellermann
118b76a8f1
db/Interface, ...: forward-declare TagType
2023-03-06 15:25:30 +01:00
Max Kellermann
a302d34f6d
tag/Names: convert to C++
2023-03-06 15:16:33 +01:00
Max Kellermann
148aca23be
use SPDX IDs, replacing the long copyright headers
2023-03-06 14:59:48 +01:00
Max Kellermann
c122e990a3
Merge branch 'master' of https://github.com/faceless2/MPD
2023-01-17 19:03:49 +01:00
Mike Bremford
b96e44b362
Unlike album, artist and albumartist, title and composer were not used as a fallback
...
when titlesort and composersort were specified but unavailable - this patch fixes that.
2023-01-09 18:15:44 +00:00
Max Kellermann
8a7b7dffec
Merge branch 'v0.23.x'
2023-01-06 08:12:38 +01:00
gd
abb28593ce
TagBuilder::RemoveType: added missing tag pool lock before call to tag_pool_put_item
2022-12-29 08:43:10 +01:00
Max Kellermann
fa58db798b
lib/fmt/RuntimeError: new library
...
Replacing FormatRuntimeError().
2022-11-29 14:10:34 +01:00
gd
a1359f2388
TagBuilder: skip unnecessary preperation if there are no items to add
2022-11-01 17:55:42 +02:00
gd
ab687481cc
Tag: skip tag pool lock if there are no items
2022-11-01 15:37:54 +02:00
Sonico
3ef83cc34e
Add titleSort tag
2022-07-20 23:05:10 -03:00
Max Kellermann
cc0def15c4
Copyright year 2022
2022-07-14 17:59:35 +02:00
Max Kellermann
683f0da2e7
tag/*: use std::string_view instead of StringView
2022-07-04 15:04:31 +02:00
Max Kellermann
0727ee94c0
tag/Id3Scan: use std::string_view
2022-07-01 11:29:10 +02:00
Max Kellermann
4a97c45585
tag/Config: use IterableSplitString instead of SplitString()
2022-06-30 20:39:39 +02:00
Max Kellermann
a7b7e35512
tag/ReplayGainParser: use std::string_view
2022-06-30 10:59:56 +02:00
Max Kellermann
11135b48e6
tag/MixRampParser: use std::string_view
2022-06-30 10:59:27 +02:00
Max Kellermann
d0382caa88
tag/ApeLoader: use std::string_view
2022-06-30 10:58:22 +02:00
Max Kellermann
4765726bda
tag/VorbisComment: use std::string_view
2022-06-30 10:57:01 +02:00
Max Kellermann
455a412aaa
tag/Table: use std::string_view
2022-06-30 10:53:26 +02:00
Max Kellermann
1a2b505979
tag/ParseName: use std::string_view
2022-06-30 10:52:21 +02:00
Max Kellermann
c34f3c9b94
tag/Handler: use StringIsEqualIgnoreCase()
2022-06-30 10:50:56 +02:00
Max Kellermann
ec66ee3bfb
tag/Handler: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
ca9dd74fbf
tag/Builder: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
2da847dd30
tag/Pool: use std::string_view instead of StringView
2022-06-29 17:22:17 +02:00
Max Kellermann
73e2ac4211
tag/FixString: use std::string_view instead of StringView
2022-05-24 14:18:33 +02:00
Max Kellermann
6d113de1f8
tag/Handler: pass std::span to OnPicture()
2022-05-24 14:18:33 +02:00