Skip to content

Commit

Permalink
update: bump fb2k sdk version to 20240807
Browse files Browse the repository at this point in the history
  • Loading branch information
pnck committed Oct 18, 2024
1 parent 33f26ee commit eb46987
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 11 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ jobs:

- name: Download Foobar2000 SDK
run: |
curl -L https://www.foobar2000.org/files/SDK-2023-09-23.7z -o vendor/foobar2000_sdk.7z
curl -L https://www.foobar2000.org/files/SDK-2024-08-07.7z -o vendor/foobar2000_sdk.7z
7z x vendor/foobar2000_sdk.7z -ovendor/sdk
ls vendor/sdk
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ jobs:

- name: Download Foobar2000 SDK
run: |
curl -L https://www.foobar2000.org/files/SDK-2023-09-23.7z -o vendor/foobar2000_sdk.7z
curl -L https://www.foobar2000.org/files/SDK-2024-08-07.7z -o vendor/foobar2000_sdk.7z
7z x vendor/foobar2000_sdk.7z -ovendor/sdk
ls vendor/sdk
Expand Down
10 changes: 6 additions & 4 deletions foo_input_ncm.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -29,26 +29,26 @@
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>DynamicLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
Expand Down Expand Up @@ -119,6 +119,7 @@
<AdditionalIncludeDirectories>src;vendor/spdlog/include;vendor/json/include;vendor/sdk;vendor/sdk/foobar2000</AdditionalIncludeDirectories>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<PrecompiledHeader>Use</PrecompiledHeader>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down Expand Up @@ -171,6 +172,7 @@ copy $(TargetPath) $(ProjectDir)dist\$(Platform)\</Command>
<AdditionalIncludeDirectories>src;vendor/spdlog/include;vendor/json/include;vendor/sdk;vendor/sdk/foobar2000</AdditionalIncludeDirectories>
<AdditionalOptions>/Zc:__cplusplus %(AdditionalOptions)</AdditionalOptions>
<PrecompiledHeader>Use</PrecompiledHeader>
<WholeProgramOptimization>false</WholeProgramOptimization>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
Expand Down
10 changes: 6 additions & 4 deletions src/meta_process.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@

#include <type_traits>
#include <concepts>
#include <string>

namespace fb2k_ncm
{
Expand All @@ -20,8 +21,8 @@ namespace fb2k_ncm
using CT = std::remove_cvref_t<decltype(*std::declval<T>())>;
constexpr bool is_char_seq = requires {
{
CT{}.data()[0] /* NOTE: map::operator[] accepts pointer, so can't be distinguished by [0]*/
} -> std::convertible_to<char>;
CT{}.data() /* NOTE: map::operator[] accepts pointer, so can't be distinguished by CT{}[0]*/
} -> std::convertible_to<const char*>;
};
if constexpr (std::convertible_to<CT, uint64_t> || is_char_seq) {
return true;
Expand All @@ -46,12 +47,13 @@ namespace fb2k_ncm
concept multiT = opt_is_multi<T>();

consteval void traits_tests() {
using ST = decltype(uniform_meta_st{}.album);
using ST = decltype(uniform_meta_st{}.title);
using MT = decltype(uniform_meta_st{}.genre);
using artistT = decltype(uniform_meta_st{}.artist);
static_assert(singleT<std::optional<std::string>>, "check your template implementation");
static_assert(singleT<ST>, "check your template implementation");
static_assert(multiT<MT>, "check your template implementation");
static_assert(!singleT<artistT> && !multiT<artistT>, "check your template implementation");
//static_assert(!singleT<artistT> && !multiT<artistT>, "check your template implementation");
}
} // namespace

Expand Down
2 changes: 1 addition & 1 deletion test/unit/win32/foo_input_ncm_tests.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<Keyword>Win32Proj</Keyword>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
<ConfigurationType>Application</ConfigurationType>
<PlatformToolset>v143</PlatformToolset>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
<ProjectName>foo_input_ncm_tests</ProjectName>
</PropertyGroup>
Expand Down

0 comments on commit eb46987

Please sign in to comment.