1
0
Fork 0

bump version to `3.1.1`.

This commit is contained in:
chinosk 2025-12-10 13:20:32 +08:00
parent c4b13a1392
commit 3ea8efbaa0
Signed by: chinosk
GPG Key ID: 00610B08C1BF7BE9
2 changed files with 8 additions and 1 deletions

View File

@ -39,6 +39,12 @@ namespace GakumasLocal::Local {
return Plugin::GetInstance().GetHookInstaller()->localizationFilesDir; return Plugin::GetInstance().GetHookInstaller()->localizationFilesDir;
} }
bool isAllSpace(const std::string& str) {
return std::all_of(str.begin(), str.end(), [](unsigned char c) {
return std::isspace(c);
});
}
std::string trim(const std::string& str) { std::string trim(const std::string& str) {
auto is_not_space = [](char ch) { return !std::isspace(ch); }; auto is_not_space = [](char ch) { return !std::isspace(ch); };
auto start = std::ranges::find_if(str, is_not_space); auto start = std::ranges::find_if(str, is_not_space);
@ -343,6 +349,7 @@ namespace GakumasLocal::Local {
bool hasNotTrans = false; bool hasNotTrans = false;
if (!waitingReplaceTexts.empty()) { if (!waitingReplaceTexts.empty()) {
for (const auto& i : waitingReplaceTexts) { for (const auto& i : waitingReplaceTexts) {
if (isAllSpace(i)) continue;
std::string searchResult = findInMapIgnoreSpace(i, genericSplitText); std::string searchResult = findInMapIgnoreSpace(i, genericSplitText);
if (!searchResult.empty()) { if (!searchResult.empty()) {
ReplaceNumberComma(&searchResult); ReplaceNumberComma(&searchResult);

View File

@ -11,7 +11,7 @@
#define LogMinVersion ANDROID_LOG_DEBUG #define LogMinVersion ANDROID_LOG_DEBUG
#define PLUGIN_VERSION "3.1.0" #define PLUGIN_VERSION "3.1.1"
#define ADD_HOOK(name, addr) \ #define ADD_HOOK(name, addr) \
name##_Addr = reinterpret_cast<name##_Type>(addr); \ name##_Addr = reinterpret_cast<name##_Type>(addr); \