We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7a2b0b4 commit 83716e6Copy full SHA for 83716e6
mlcc
others/Hanz2Piny.cpp
@@ -59,7 +59,7 @@ Hanz2Piny::toPinyinFromUnicode (const Unicode hanzi_unicode, const bool with_ton
59
// 不带声调
60
vector<string> polyphone_list_without_tone;
61
for (const auto& polyphone : polyphone_list_with_tone) {
62
- const auto& iter = std::find_if(polyphone.cbegin(), polyphone.cend(), isdigit);
+ const auto& iter = std::ranges::find_if(polyphone.cbegin(), polyphone.cend(), isdigit);
63
polyphone_list_without_tone.emplace_back(polyphone.cbegin(), iter);
64
}
65
return(polyphone_list_without_tone);
src/Engine.cpp
@@ -534,7 +534,7 @@ int Engine::openAudio(int& freq, int& channels, int& size, int minsize, AudioCal
534
channels = 2;
535
536
want.freq = freq;
537
- want.format = AUDIO_S16;
+ want.format = AUDIO_F32;
538
want.channels = channels;
539
want.samples = size;
540
want.callback = mixAudioCallback;
src/Event.h
@@ -174,8 +174,8 @@ class Event
174
175
176
template <typename F, typename C, std::size_t... I>
177
- typename std::enable_if<check_return_type<F, C, void>::value, void>::type
178
- runner_impl(F f, C* c, const std::vector<int>& e, int& i, std::index_sequence<I...>)
+ requires check_return_type<F, C, void>::value
+ void runner_impl(F f, C* c, const std::vector<int>& e, int& i, std::index_sequence<I...>)
179
{
180
auto cur_i = i;
181
i += sizeof...(I) + 1;
@@ -184,8 +184,8 @@ class Event
184
185
186
187
- typename std::enable_if<check_return_type<F, C, bool>::value, void>::type
188
+ requires check_return_type<F, C, bool>::value
189
190
191
src/Script.cpp
@@ -7,8 +7,7 @@
7
#include <array>
8
#include <functional>
9
10
-template <typename T>
11
-int rModifier(const std::string& data_name, T getDataFromIndex, lua_State* L)
+int rModifier(auto data_name, auto getDataFromIndex, lua_State* L)
12
13
int index = lua_tonumber(L, 1);
14
std::string name = lua_tostring(L, 2);
src/Script.h
@@ -38,16 +38,16 @@ class Script
38
39
40
template <typename F, typename C, std::size_t N>
41
- static typename std::enable_if<check_return_type<F, C, void>::value, int>::type
42
- runner(F f, C* c, const std::array<int, N>& e, lua_State* L)
+ static int runner(F f, C* c, const std::array<int, N>& e, lua_State* L)
43
44
runner_impl(f, c, e, std::make_index_sequence<arg_counter<F, C>::value>{});
45
return 0;
46
47
48
49
- static typename std::enable_if<check_return_type<F, C, bool>::value, int>::type
50
51
52
lua_pushboolean(L, runner_impl(f, c, e, std::make_index_sequence<arg_counter<F, C>::value>{}));
53
return 1;
src/kys.vcxproj
@@ -94,11 +94,11 @@
94
<PreprocessorDefinitions>WITH_SMALLPOT1;WITH_NETWORK;WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
95
<AdditionalIncludeDirectories>../include;../mod;.;$(VCPKG_LIB_PATH)\x64-windows\include;../mlcc;../local/include</AdditionalIncludeDirectories>
96
<MultiProcessorCompilation>true</MultiProcessorCompilation>
97
- <LanguageStandard>stdcpp17</LanguageStandard>
+ <LanguageStandard>stdcpplatest</LanguageStandard>
98
<AdditionalOptions>/source-charset:utf-8 /execution-charset:utf-8 %(AdditionalOptions)</AdditionalOptions>
99
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
100
- <ScanSourceForModuleDependencies>true</ScanSourceForModuleDependencies>
101
- <TranslateIncludes>true</TranslateIncludes>
+ <ScanSourceForModuleDependencies>false</ScanSourceForModuleDependencies>
+ <TranslateIncludes>false</TranslateIncludes>
102
</ClCompile>
103
<Link>
104
<SubSystem>Console</SubSystem>
0 commit comments