diff --git a/3rd_Party/README.md b/3rd_Party/README.md index 66bee75c2..e476f619d 100644 --- a/3rd_Party/README.md +++ b/3rd_Party/README.md @@ -55,8 +55,8 @@ Verify the Xcode version with `xcode-select -p`. | pugixml | 1.14 | 2023.10.01 | https://github.com/zeux/pugixml.git | rapidjson | head | 2024.10.07 | https://github.com/Tencent/rapidjson | re2 | 2023-03-01 | 2023.03.01 | https://github.com/google/re2.git -| sparkle | 2.6.1 | 2024.06.02 | https://github.com/sparkle-project/Sparkle.git -| spdlog | 1.14.1 | 2024.04.30 | https://github.com/gabime/spdlog.git -| unordered_dense | 4.4.0 | 2023.12.24 | https://github.com/martinus/unordered_dense.git +| sparkle | 2.6.4 | 2024.07.01 | https://github.com/sparkle-project/Sparkle.git +| spdlog | 1.15.0 | 2024.11.09 | https://github.com/gabime/spdlog.git +| unordered_dense | 4.5.0 | 2024.12.03 | https://github.com/martinus/unordered_dense.git | zlib | 1.3.1 | 2024.01.22 | https://zlib.net/zlib-1.3.1.tar.gz | zstd | 1.5.6 | 2024.03.30 | https://github.com/facebook/zstd.git diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Autoupdate b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Autoupdate index 48af54bbd..df690f8b2 100755 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Autoupdate and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Autoupdate differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdateAlert.nib b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdateAlert.nib index 8e4f4f489..d62665666 100644 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdateAlert.nib and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdateAlert.nib differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib index 1fe72f84b..e3bdabcd8 100644 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib index 7278a4136..bfe3ca509 100644 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Info.plist b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Info.plist index a7f31626b..46bc02599 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Info.plist +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 23G93 + 24B83 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType FMWK CFBundleShortVersionString - 2.6.1 + 2.6.4 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -25,23 +25,23 @@ MacOSX CFBundleVersion - 2037 + 2039.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 24A5324a + 24C94 DTPlatformName macosx DTPlatformVersion - 15.0 + 15.2 DTSDKBuild - 24A5324a + 24C94 DTSDKName - macosx15.0 + macosx15.2 DTXcode - 1600 + 1620 DTXcodeBuild - 16A5230g + 16C5032a LSMinimumSystemVersion 10.13 diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/SUStatus.nib b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/SUStatus.nib index 1e14add54..5661aba0c 100644 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/SUStatus.nib and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Resources/SUStatus.nib differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Sparkle b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Sparkle index d9ea476ac..b6998b3cf 100755 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Sparkle and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Sparkle differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Info.plist b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Info.plist index 06ea22038..8261c6a89 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Info.plist +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 23G93 + 24B83 CFBundleDevelopmentRegion en CFBundleExecutable @@ -55,7 +55,7 @@ CFBundlePackageType APPL CFBundleShortVersionString - 2.6.1 + 2.6.4 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -63,23 +63,23 @@ MacOSX CFBundleVersion - 2037 + 2039.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 24A5324a + 24C94 DTPlatformName macosx DTPlatformVersion - 15.0 + 15.2 DTSDKBuild - 24A5324a + 24C94 DTSDKName - macosx15.0 + macosx15.2 DTXcode - 1600 + 1620 DTXcodeBuild - 16A5230g + 16C5032a LSApplicationCategoryType public.app-category.utilities LSMinimumSystemVersion diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater index 798ab3588..88bfd3a70 100755 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/MacOS/Updater differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Resources/SUStatus.nib b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Resources/SUStatus.nib index 1e14add54..5661aba0c 100644 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Resources/SUStatus.nib and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/Resources/SUStatus.nib differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/_CodeSignature/CodeResources b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/_CodeSignature/CodeResources index caa8b94b3..cd5c6d739 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/_CodeSignature/CodeResources +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/Updater.app/Contents/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Resources/SUStatus.nib - ZAnGku07bS8gPWfDKzQvhK49E+A= + mvkHPsVFMOgSQABLEslAOaWhaM8= files2 @@ -15,7 +15,7 @@ hash2 - EKe925NYcAgvdxcboaIaOFNtL17zDmjuLzUz7/YDpM0= + LsINg7m9bj6muHQHWyyTTROoMm/yFWsbDnQqP9eo0O4= diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/Info.plist b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/Info.plist index 0fe5036bb..ff7bb90ea 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/Info.plist +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 23G93 + 24B83 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.6.1 + 2.6.4 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -25,23 +25,23 @@ MacOSX CFBundleVersion - 2037 + 2039.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 24A5324a + 24C94 DTPlatformName macosx DTPlatformVersion - 15.0 + 15.2 DTSDKBuild - 24A5324a + 24C94 DTSDKName - macosx15.0 + macosx15.2 DTXcode - 1600 + 1620 DTXcodeBuild - 16A5230g + 16C5032a LSMinimumSystemVersion 10.13 NSAppTransportSecurity diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader index b9824c17c..b90495e99 100755 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Downloader.xpc/Contents/MacOS/Downloader differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/Info.plist b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/Info.plist index 09989ae75..ec1f18416 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/Info.plist +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/Info.plist @@ -3,7 +3,7 @@ BuildMachineOSBuild - 23G93 + 24B83 CFBundleDevelopmentRegion en CFBundleExecutable @@ -17,7 +17,7 @@ CFBundlePackageType XPC! CFBundleShortVersionString - 2.6.1 + 2.6.4 CFBundleSignature ???? CFBundleSupportedPlatforms @@ -25,23 +25,23 @@ MacOSX CFBundleVersion - 2037 + 2039.1 DTCompiler com.apple.compilers.llvm.clang.1_0 DTPlatformBuild - 24A5324a + 24C94 DTPlatformName macosx DTPlatformVersion - 15.0 + 15.2 DTSDKBuild - 24A5324a + 24C94 DTSDKName - macosx15.0 + macosx15.2 DTXcode - 1600 + 1620 DTXcodeBuild - 16A5230g + 16C5032a LSMinimumSystemVersion 10.13 NSHumanReadableCopyright diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/MacOS/Installer b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/MacOS/Installer index c8cc4e699..dda09c2cc 100755 Binary files a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/MacOS/Installer and b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/XPCServices/Installer.xpc/Contents/MacOS/Installer differ diff --git a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/_CodeSignature/CodeResources b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/_CodeSignature/CodeResources index 577970553..250e1231f 100644 --- a/3rd_Party/Sparkle/Sparkle.framework/Versions/B/_CodeSignature/CodeResources +++ b/3rd_Party/Sparkle/Sparkle.framework/Versions/B/_CodeSignature/CodeResources @@ -6,15 +6,15 @@ Resources/Base.lproj/SUUpdateAlert.nib - eBQK56K7Zi7fyb8hmUBvAAKDflo= + CwzRlLP+3NEQAAEUMnf22jOrOFU= Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib - f1xkYDhE0BT0n3LxhxuDRcGBlLk= + 31yM57uI4RmDcwpU90kssxX0OiI= Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib - dCevxm0fvHkUqJiG9KJJJ7H1wtg= + WAxCULN6jwQjUkhdtZszbbEbElM= Resources/Base.lproj/Sparkle.strings @@ -22,7 +22,7 @@ Resources/Info.plist - CU9SOhCb7nYLmmQmJ5/NUIXgKig= + W6yAmG2KRiowMBGJXhNkTecRWaw= Resources/ReleaseNotesColorStyle.css @@ -30,7 +30,7 @@ Resources/SUStatus.nib - ZAnGku07bS8gPWfDKzQvhK49E+A= + mvkHPsVFMOgSQABLEslAOaWhaM8= Resources/ar.lproj/SUUpdateAlert.strings @@ -939,10 +939,10 @@ cdhash - 0tP0lDyqGENjO38pU4Ou/nd9vWw= + xnw3pFjZ6UXTCyf2epi68wZqmTg= requirement - cdhash H"d2d3f4943caa1843633b7f295383aefe777dbd6c" or cdhash H"b958b1f76c4f2ae3d6b843a7ddc2279c7bc77700" + cdhash H"c67c37a458d9e945d30b27f67a98baf3066a9938" or cdhash H"ce61137493f0e45aa7d4176f2e30a258f7bd4ef1" Headers/SPUDownloadData.h @@ -1158,21 +1158,21 @@ hash2 - 2Z0dXFe+B5t9UpTEl02RwlVz8V2TtMBUE1dV576cPgo= + Ljl/rK2RBYbzB2DKeTqfO00nOp8F0b7te4vJoUFAMWE= Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-101300.nib hash2 - Vm3IuajHd6rLp7CLp0DPmYXQGC43+a5z6MU+ICu/2vk= + 2ApUH/ejbTkxM01rBdnOhPZg35tsnPDYZwiQRPx9Q/c= Resources/Base.lproj/SUUpdatePermissionPrompt.nib/keyedobjects-110000.nib hash2 - Uv3E6/aop9N4mHRhvET4JLnbkvPokib+LW5ygCdPpIs= + i4NBxlosPCkv293WsvkW7OmbJKiHVP9y06VIAOj5nC4= Resources/Base.lproj/Sparkle.strings @@ -1186,7 +1186,7 @@ hash2 - 4eIah47zOTXNyKQH/yKsb7Mg9oQD0h1kkVKr1rGDJlY= + fsMqE33Z5aa7QEzx4QGDXIN1Qg8vGSgruT1audGQDqo= Resources/ReleaseNotesColorStyle.css @@ -1200,7 +1200,7 @@ hash2 - EKe925NYcAgvdxcboaIaOFNtL17zDmjuLzUz7/YDpM0= + LsINg7m9bj6muHQHWyyTTROoMm/yFWsbDnQqP9eo0O4= Resources/ar.lproj/SUUpdateAlert.strings @@ -2107,28 +2107,28 @@ cdhash - tooTko0dE29snYyRAxnWxvqP+lc= + y6EwVDg/cZorn6hRNcAIlZLsS0A= requirement - cdhash H"b68a13928d1d136f6c9d8c910319d6c6fa8ffa57" or cdhash H"80defc6b85ef53f965055cbe43e1be46056f9bae" + cdhash H"cba13054383f719a2b9fa85135c0089592ec4b40" or cdhash H"c4fd5f9fb1fa4f17afaa6dcfbfdd171ed04ef074" XPCServices/Downloader.xpc cdhash - A+xHakKuGXizsz6k3xifwWuafzw= + ghsrUsH8Tga48y4sSiV9Qfp0+qE= requirement - cdhash H"03ec476a42ae1978b3b33ea4df189fc16b9a7f3c" or cdhash H"2e8bf408dc29a6159a27bc57dfac39fdea3093b4" + cdhash H"821b2b52c1fc4e06b8f32e2c4a257d41fa74faa1" or cdhash H"7e6b47da0fac3efdd6673713ba9787297c9446a1" XPCServices/Installer.xpc cdhash - 0M5djLhamWuot0RTeXljgaaNKJg= + EvmcbgHNySUzjJvBr6v0Bg8KBpU= requirement - cdhash H"d0ce5d8cb85a996ba8b7445379796381a68d2898" or cdhash H"e77e789ad007a20a6ab38608b1991aa494aa9ffe" + cdhash H"12f99c6e01cdc925338c9bc1afabf4060f0a0695" or cdhash H"e030a21edffffadeca298029d0f0de7e86a0710f" rules diff --git a/3rd_Party/Sparkle/bootstrap.sh b/3rd_Party/Sparkle/bootstrap.sh index 9c4e7fdef..5bf59e6ba 100755 --- a/3rd_Party/Sparkle/bootstrap.sh +++ b/3rd_Party/Sparkle/bootstrap.sh @@ -9,7 +9,7 @@ TMP_DIR=${CUR_DIR}/sparkle.tmp mkdir ${TMP_DIR} cd ${TMP_DIR} -git clone -b 2.6.1 --single-branch --depth=1 --recursive https://github.com/sparkle-project/Sparkle.git +git clone -b 2.6.4 --single-branch --depth=1 --recursive https://github.com/sparkle-project/Sparkle.git cd Sparkle diff --git a/3rd_Party/spdlog/bootstrap.sh b/3rd_Party/spdlog/bootstrap.sh index ce66bec86..944bde684 100755 --- a/3rd_Party/spdlog/bootstrap.sh +++ b/3rd_Party/spdlog/bootstrap.sh @@ -9,7 +9,7 @@ TMP_DIR=${CUR_DIR}/spdlog.tmp mkdir ${TMP_DIR} cd ${TMP_DIR} -git clone -b v1.14.1 --single-branch --depth=1 https://github.com/gabime/spdlog.git +git clone -b v1.15.0 --single-branch --depth=1 https://github.com/gabime/spdlog.git cd spdlog clang++ -c \ diff --git a/3rd_Party/spdlog/include/spdlog/details/mpmc_blocking_q.h b/3rd_Party/spdlog/include/spdlog/details/mpmc_blocking_q.h index 5a474bf33..5848cca83 100644 --- a/3rd_Party/spdlog/include/spdlog/details/mpmc_blocking_q.h +++ b/3rd_Party/spdlog/include/spdlog/details/mpmc_blocking_q.h @@ -148,19 +148,19 @@ class mpmc_blocking_queue { #endif size_t overrun_counter() { - std::unique_lock lock(queue_mutex_); + std::lock_guard lock(queue_mutex_); return q_.overrun_counter(); } size_t discard_counter() { return discard_counter_.load(std::memory_order_relaxed); } size_t size() { - std::unique_lock lock(queue_mutex_); + std::lock_guard lock(queue_mutex_); return q_.size(); } void reset_overrun_counter() { - std::unique_lock lock(queue_mutex_); + std::lock_guard lock(queue_mutex_); q_.reset_overrun_counter(); } diff --git a/3rd_Party/spdlog/include/spdlog/details/thread_pool.h b/3rd_Party/spdlog/include/spdlog/details/thread_pool.h index 0d56a091c..f22b07821 100644 --- a/3rd_Party/spdlog/include/spdlog/details/thread_pool.h +++ b/3rd_Party/spdlog/include/spdlog/details/thread_pool.h @@ -9,7 +9,6 @@ #include #include -#include #include #include #include @@ -28,7 +27,6 @@ enum class async_msg_type { log, flush, terminate }; struct async_msg : log_msg_buffer { async_msg_type msg_type{async_msg_type::log}; async_logger_ptr worker_ptr; - std::promise flush_promise; async_msg() = default; ~async_msg() = default; @@ -58,20 +56,12 @@ struct async_msg : log_msg_buffer { async_msg(async_logger_ptr &&worker, async_msg_type the_type, const details::log_msg &m) : log_msg_buffer{m}, msg_type{the_type}, - worker_ptr{std::move(worker)}, - flush_promise{} {} + worker_ptr{std::move(worker)} {} async_msg(async_logger_ptr &&worker, async_msg_type the_type) : log_msg_buffer{}, msg_type{the_type}, - worker_ptr{std::move(worker)}, - flush_promise{} {} - - async_msg(async_logger_ptr &&worker, async_msg_type the_type, std::promise &&promise) - : log_msg_buffer{}, - msg_type{the_type}, - worker_ptr{std::move(worker)}, - flush_promise{std::move(promise)} {} + worker_ptr{std::move(worker)} {} explicit async_msg(async_msg_type the_type) : async_msg{nullptr, the_type} {} @@ -98,8 +88,7 @@ class SPDLOG_API thread_pool { void post_log(async_logger_ptr &&worker_ptr, const details::log_msg &msg, async_overflow_policy overflow_policy); - std::future post_flush(async_logger_ptr &&worker_ptr, - async_overflow_policy overflow_policy); + void post_flush(async_logger_ptr &&worker_ptr, async_overflow_policy overflow_policy); size_t overrun_counter(); void reset_overrun_counter(); size_t discard_counter(); diff --git a/3rd_Party/spdlog/include/spdlog/mdc.h b/3rd_Party/spdlog/include/spdlog/mdc.h index 41f0c1f3f..80b6f25cd 100644 --- a/3rd_Party/spdlog/include/spdlog/mdc.h +++ b/3rd_Party/spdlog/include/spdlog/mdc.h @@ -3,6 +3,10 @@ #pragma once +#if defined(SPDLOG_NO_TLS) + #error "This header requires thread local storage support, but SPDLOG_NO_TLS is defined." +#endif + #include #include diff --git a/3rd_Party/spdlog/include/spdlog/sinks/ansicolor_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/ansicolor_sink.h index ff53730c0..d0dadd75d 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/ansicolor_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/ansicolor_sink.h @@ -40,7 +40,7 @@ class ansicolor_sink : public sink { void log(const details::log_msg &msg) override; void flush() override; - void set_pattern(const std::string &pattern) final; + void set_pattern(const std::string &pattern) final override; void set_formatter(std::unique_ptr sink_formatter) override; // Formatting codes diff --git a/3rd_Party/spdlog/include/spdlog/sinks/base_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/base_sink.h index 1ca772a65..1b4bb0689 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/base_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/base_sink.h @@ -28,10 +28,10 @@ class SPDLOG_API base_sink : public sink { base_sink &operator=(const base_sink &) = delete; base_sink &operator=(base_sink &&) = delete; - void log(const details::log_msg &msg) final; - void flush() final; - void set_pattern(const std::string &pattern) final; - void set_formatter(std::unique_ptr sink_formatter) final; + void log(const details::log_msg &msg) final override; + void flush() final override; + void set_pattern(const std::string &pattern) final override; + void set_formatter(std::unique_ptr sink_formatter) final override; protected: // sink formatter diff --git a/3rd_Party/spdlog/include/spdlog/sinks/callback_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/callback_sink.h index 71668ef28..5f8b6bc4f 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/callback_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/callback_sink.h @@ -27,7 +27,7 @@ class callback_sink final : public base_sink { protected: void sink_it_(const details::log_msg &msg) override { callback_(msg); } - void flush_() override{}; + void flush_() override{} private: custom_log_callback callback_; diff --git a/3rd_Party/spdlog/include/spdlog/sinks/daily_file_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/daily_file_sink.h index 1b1dc44a8..884145fd2 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/daily_file_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/daily_file_sink.h @@ -62,6 +62,9 @@ struct daily_filename_format_calculator { * Rotating file sink based on date. * If truncate != false , the created file will be truncated. * If max_files > 0, retain only the last max_files and delete previous. + * If max_files > 0, retain only the last max_files and delete previous. + * Note that old log files from previous executions will not be deleted by this class, + * rotation and deletion is only applied while the program is running. */ template class daily_file_sink final : public base_sink { diff --git a/3rd_Party/spdlog/include/spdlog/sinks/hourly_file_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/hourly_file_sink.h index 1f138925f..3e618725b 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/hourly_file_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/hourly_file_sink.h @@ -39,6 +39,8 @@ struct hourly_filename_calculator { * Rotating file sink based on time. * If truncate != false , the created file will be truncated. * If max_files > 0, retain only the last max_files and delete previous. + * Note that old log files from previous executions will not be deleted by this class, + * rotation and deletion is only applied while the program is running. */ template class hourly_file_sink final : public base_sink { diff --git a/3rd_Party/spdlog/include/spdlog/sinks/msvc_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/msvc_sink.h index 2e5f6875e..c28d6ebd7 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/msvc_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/msvc_sink.h @@ -32,7 +32,7 @@ class msvc_sink : public base_sink { public: msvc_sink() = default; msvc_sink(bool check_debugger_present) - : check_debugger_present_{check_debugger_present} {}; + : check_debugger_present_{check_debugger_present} {} protected: void sink_it_(const details::log_msg &msg) override { diff --git a/3rd_Party/spdlog/include/spdlog/sinks/syslog_sink.h b/3rd_Party/spdlog/include/spdlog/sinks/syslog_sink.h index a2df3b44d..913d41be6 100644 --- a/3rd_Party/spdlog/include/spdlog/sinks/syslog_sink.h +++ b/3rd_Party/spdlog/include/spdlog/sinks/syslog_sink.h @@ -64,13 +64,14 @@ class syslog_sink : public base_sink { // // Simply maps spdlog's log level to syslog priority level. // - int syslog_prio_from_level(const details::log_msg &msg) const { + virtual int syslog_prio_from_level(const details::log_msg &msg) const { return syslog_levels_.at(static_cast(msg.level)); } -private: using levels_array = std::array; levels_array syslog_levels_; + +private: // must store the ident because the man says openlog might use the pointer as // is and not a string copy const std::string ident_; diff --git a/3rd_Party/spdlog/include/spdlog/version.h b/3rd_Party/spdlog/include/spdlog/version.h index 4fa94cb68..7c5e12954 100644 --- a/3rd_Party/spdlog/include/spdlog/version.h +++ b/3rd_Party/spdlog/include/spdlog/version.h @@ -4,8 +4,8 @@ #pragma once #define SPDLOG_VER_MAJOR 1 -#define SPDLOG_VER_MINOR 14 -#define SPDLOG_VER_PATCH 1 +#define SPDLOG_VER_MINOR 15 +#define SPDLOG_VER_PATCH 0 #define SPDLOG_TO_VERSION(major, minor, patch) (major * 10000 + minor * 100 + patch) #define SPDLOG_VERSION SPDLOG_TO_VERSION(SPDLOG_VER_MAJOR, SPDLOG_VER_MINOR, SPDLOG_VER_PATCH) diff --git a/3rd_Party/spdlog/lib/libspdlog.a b/3rd_Party/spdlog/lib/libspdlog.a index 5b771712f..f50cdf069 100644 Binary files a/3rd_Party/spdlog/lib/libspdlog.a and b/3rd_Party/spdlog/lib/libspdlog.a differ diff --git a/3rd_Party/unordered_dense/bootstrap.sh b/3rd_Party/unordered_dense/bootstrap.sh index 36b5e0c74..e78177e90 100755 --- a/3rd_Party/unordered_dense/bootstrap.sh +++ b/3rd_Party/unordered_dense/bootstrap.sh @@ -9,7 +9,7 @@ TMP_DIR=${CUR_DIR}/ud.tmp mkdir ${TMP_DIR} cd ${TMP_DIR} -git clone -b v4.4.0 --single-branch https://github.com/martinus/unordered_dense.git +git clone -b v4.5.0 --single-branch https://github.com/martinus/unordered_dense.git cd .. diff --git a/3rd_Party/unordered_dense/include/ankerl/unordered_dense.h b/3rd_Party/unordered_dense/include/ankerl/unordered_dense.h index 2aaacd617..13484a981 100644 --- a/3rd_Party/unordered_dense/include/ankerl/unordered_dense.h +++ b/3rd_Party/unordered_dense/include/ankerl/unordered_dense.h @@ -1,12 +1,12 @@ ///////////////////////// ankerl::unordered_dense::{map, set} ///////////////////////// // A fast & densely stored hashmap and hashset based on robin-hood backward shift deletion. -// Version 4.4.0 +// Version 4.5.0 // https://github.com/martinus/unordered_dense // // Licensed under the MIT License . // SPDX-License-Identifier: MIT -// Copyright (c) 2022-2023 Martin Leitner-Ankerl +// Copyright (c) 2022-2024 Martin Leitner-Ankerl // // Permission is hereby granted, free of charge, to any person obtaining a copy // of this software and associated documentation files (the "Software"), to deal @@ -31,7 +31,7 @@ // see https://semver.org/spec/v2.0.0.html #define ANKERL_UNORDERED_DENSE_VERSION_MAJOR 4 // NOLINT(cppcoreguidelines-macro-usage) incompatible API changes -#define ANKERL_UNORDERED_DENSE_VERSION_MINOR 4 // NOLINT(cppcoreguidelines-macro-usage) backwards compatible functionality +#define ANKERL_UNORDERED_DENSE_VERSION_MINOR 5 // NOLINT(cppcoreguidelines-macro-usage) backwards compatible functionality #define ANKERL_UNORDERED_DENSE_VERSION_PATCH 0 // NOLINT(cppcoreguidelines-macro-usage) backwards compatible bug fixes // API versioning with inline namespace, see https://www.foonathan.net/2018/11/inline-namespaces/ @@ -98,7 +98,7 @@ # include // for abort # endif -# if defined(__has_include) +# if defined(__has_include) && !defined(ANKERL_UNORDERED_DENSE_DISABLE_PMR) # if __has_include() # define ANKERL_UNORDERED_DENSE_PMR std::pmr // NOLINT(cppcoreguidelines-macro-usage) # include // for polymorphic_allocator @@ -277,6 +277,15 @@ struct hash { } }; +template +struct hash::is_avalanching> { + using is_avalanching = void; + auto operator()(T const& obj) const noexcept(noexcept(std::declval>().operator()(std::declval()))) + -> uint64_t { + return std::hash{}(obj); + } +}; + template struct hash> { using is_avalanching = void; @@ -436,6 +445,7 @@ ANKERL_UNORDERED_DENSE_PACK(struct big { namespace detail { struct nonesuch {}; +struct default_container_t {}; template class Op, class... Args> struct detector { @@ -578,6 +588,12 @@ class segmented_vector { return *this; } + constexpr auto operator++(int) noexcept -> iter_t { + iter_t prev(*this); + this->operator++(); + return prev; + } + constexpr auto operator+(difference_type diff) noexcept -> iter_t { return {m_data, static_cast(static_cast(m_idx) + diff)}; } @@ -796,6 +812,7 @@ template class table : public std::conditional_t, base_table_type_map, base_table_type_set> { using underlying_value_type = typename std::conditional_t, std::pair, Key>; @@ -810,7 +827,12 @@ class table : public std::conditional_t, base_table_type_map, bas private: using bucket_alloc = typename std::allocator_traits::template rebind_alloc; - using bucket_alloc_traits = std::allocator_traits; + using default_bucket_container_type = + std::conditional_t, std::vector>; + + using bucket_container_type = std::conditional_t, + default_bucket_container_type, + BucketContainer>; static constexpr uint8_t initial_shifts = 64 - 2; // 2^(64-m_shift) number of buckets static constexpr float default_max_load_factor = 0.8F; @@ -839,9 +861,7 @@ class table : public std::conditional_t, base_table_type_map, bas static_assert(std::is_trivially_copyable_v, "assert we can just memset / memcpy"); value_container_type m_values{}; // Contains all the key-value pairs in one densely stored container. No holes. - using bucket_pointer = typename std::allocator_traits::pointer; - bucket_pointer m_buckets{}; - size_t m_num_buckets = 0; + bucket_container_type m_buckets{}; size_t m_max_bucket_capacity = 0; float m_max_load_factor = default_max_load_factor; Hash m_hash{}; @@ -849,14 +869,18 @@ class table : public std::conditional_t, base_table_type_map, bas uint8_t m_shifts = initial_shifts; [[nodiscard]] auto next(value_idx_type bucket_idx) const -> value_idx_type { - return ANKERL_UNORDERED_DENSE_UNLIKELY(bucket_idx + 1U == m_num_buckets) + return ANKERL_UNORDERED_DENSE_UNLIKELY(bucket_idx + 1U == bucket_count()) ? 0 : static_cast(bucket_idx + 1U); } // Helper to access bucket through pointer types - [[nodiscard]] static constexpr auto at(bucket_pointer bucket_ptr, size_t offset) -> Bucket& { - return *(bucket_ptr + static_cast::difference_type>(offset)); + [[nodiscard]] static constexpr auto at(bucket_container_type& bucket, size_t offset) -> Bucket& { + return bucket[offset]; + } + + [[nodiscard]] static constexpr auto at(const bucket_container_type& bucket, size_t offset) -> const Bucket& { + return bucket[offset]; } // use the dist_inc and dist_dec functions so that uint16_t types work without warning @@ -946,7 +970,13 @@ class table : public std::conditional_t, base_table_type_map, bas } else { m_shifts = other.m_shifts; allocate_buckets_from_shift(); - std::memcpy(m_buckets, other.m_buckets, sizeof(Bucket) * bucket_count()); + if constexpr (IsSegmented || !std::is_same_v) { + for (auto i = 0UL; i < bucket_count(); ++i) { + at(m_buckets, i) = at(other.m_buckets, i); + } + } else { + std::memcpy(m_buckets.data(), other.m_buckets.data(), sizeof(Bucket) * bucket_count()); + } } } @@ -958,30 +988,38 @@ class table : public std::conditional_t, base_table_type_map, bas } void deallocate_buckets() { - auto ba = bucket_alloc(m_values.get_allocator()); - if (nullptr != m_buckets) { - bucket_alloc_traits::deallocate(ba, m_buckets, bucket_count()); - m_buckets = nullptr; - } - m_num_buckets = 0; + m_buckets.clear(); + m_buckets.shrink_to_fit(); m_max_bucket_capacity = 0; } void allocate_buckets_from_shift() { - auto ba = bucket_alloc(m_values.get_allocator()); - m_num_buckets = calc_num_buckets(m_shifts); - m_buckets = bucket_alloc_traits::allocate(ba, m_num_buckets); - if (m_num_buckets == max_bucket_count()) { + auto num_buckets = calc_num_buckets(m_shifts); + if constexpr (IsSegmented || !std::is_same_v) { + if constexpr (has_reserve) { + m_buckets.reserve(num_buckets); + } + for (size_t i = m_buckets.size(); i < num_buckets; ++i) { + m_buckets.emplace_back(); + } + } else { + m_buckets.resize(num_buckets); + } + if (num_buckets == max_bucket_count()) { // reached the maximum, make sure we can use each bucket m_max_bucket_capacity = max_bucket_count(); } else { - m_max_bucket_capacity = static_cast(static_cast(m_num_buckets) * max_load_factor()); + m_max_bucket_capacity = static_cast(static_cast(num_buckets) * max_load_factor()); } } void clear_buckets() { - if (m_buckets != nullptr) { - std::memset(&*m_buckets, 0, sizeof(Bucket) * bucket_count()); + if constexpr (IsSegmented || !std::is_same_v) { + for (auto&& e : m_buckets) { + std::memset(&e, 0, sizeof(e)); + } + } else { + std::memset(m_buckets.data(), 0, sizeof(Bucket) * bucket_count()); } } @@ -1004,7 +1042,9 @@ class table : public std::conditional_t, base_table_type_map, bas on_error_bucket_overflow(); } --m_shifts; - deallocate_buckets(); + if constexpr (!IsSegmented || std::is_same_v) { + deallocate_buckets(); + } allocate_buckets_from_shift(); clear_and_fill_buckets_from_values(); } @@ -1178,6 +1218,7 @@ class table : public std::conditional_t, base_table_type_map, bas KeyEqual const& equal = KeyEqual(), allocator_type const& alloc_or_container = allocator_type()) : m_values(alloc_or_container) + , m_buckets(alloc_or_container) , m_hash(hash) , m_equal(equal) { if (0 != bucket_count) { @@ -1253,12 +1294,7 @@ class table : public std::conditional_t, base_table_type_map, bas table(std::initializer_list init, size_type bucket_count, Hash const& hash, allocator_type const& alloc) : table(init, bucket_count, hash, KeyEqual(), alloc) {} - ~table() { - if (nullptr != m_buckets) { - auto ba = bucket_alloc(m_values.get_allocator()); - bucket_alloc_traits::deallocate(ba, m_buckets, bucket_count()); - } - } + ~table() {} auto operator=(table const& other) -> table& { if (&other != this) { @@ -1283,8 +1319,8 @@ class table : public std::conditional_t, base_table_type_map, bas // we can only reuse m_buckets when both maps have the same allocator! if (get_allocator() == other.get_allocator()) { - m_buckets = std::exchange(other.m_buckets, nullptr); - m_num_buckets = std::exchange(other.m_num_buckets, 0); + m_buckets = std::move(other.m_buckets); + other.m_buckets.clear(); m_max_bucket_capacity = std::exchange(other.m_max_bucket_capacity, 0); m_shifts = std::exchange(other.m_shifts, initial_shifts); m_max_load_factor = std::exchange(other.m_max_load_factor, default_max_load_factor); @@ -1421,7 +1457,7 @@ class table : public std::conditional_t, base_table_type_map, bas on_error_too_many_elements(); } auto shifts = calc_shifts_for_size(container.size()); - if (0 == m_num_buckets || shifts < m_shifts || container.get_allocator() != m_values.get_allocator()) { + if (0 == bucket_count() || shifts < m_shifts || container.get_allocator() != m_values.get_allocator()) { m_shifts = shifts; deallocate_buckets(); allocate_buckets_from_shift(); @@ -1821,7 +1857,7 @@ class table : public std::conditional_t, base_table_type_map, bas // bucket interface /////////////////////////////////////////////////////// auto bucket_count() const noexcept -> size_t { // NOLINT(modernize-use-nodiscard) - return m_num_buckets; + return m_buckets.size(); } static constexpr auto max_bucket_count() noexcept -> size_t { // NOLINT(modernize-use-nodiscard) @@ -1840,7 +1876,7 @@ class table : public std::conditional_t, base_table_type_map, bas void max_load_factor(float ml) { m_max_load_factor = ml; - if (m_num_buckets != max_bucket_count()) { + if (bucket_count() != max_bucket_count()) { m_max_bucket_capacity = static_cast(static_cast(bucket_count()) * max_load_factor()); } } @@ -1864,7 +1900,7 @@ class table : public std::conditional_t, base_table_type_map, bas m_values.reserve(capa); } auto shifts = calc_shifts_for_size((std::max)(capa, size())); - if (0 == m_num_buckets || shifts < m_shifts) { + if (0 == bucket_count() || shifts < m_shifts) { m_shifts = shifts; deallocate_buckets(); allocate_buckets_from_shift(); @@ -1925,30 +1961,34 @@ ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class AllocatorOrContainer = std::allocator>, - class Bucket = bucket_type::standard> -using map = detail::table; + class Bucket = bucket_type::standard, + class BucketContainer = detail::default_container_t> +using map = detail::table; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class AllocatorOrContainer = std::allocator>, - class Bucket = bucket_type::standard> -using segmented_map = detail::table; + class Bucket = bucket_type::standard, + class BucketContainer = detail::default_container_t> +using segmented_map = detail::table; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class AllocatorOrContainer = std::allocator, - class Bucket = bucket_type::standard> -using set = detail::table; + class Bucket = bucket_type::standard, + class BucketContainer = detail::default_container_t> +using set = detail::table; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class AllocatorOrContainer = std::allocator, - class Bucket = bucket_type::standard> -using segmented_set = detail::table; + class Bucket = bucket_type::standard, + class BucketContainer = detail::default_container_t> +using segmented_set = detail::table; # if defined(ANKERL_UNORDERED_DENSE_PMR) @@ -1959,29 +1999,54 @@ ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class Bucket = bucket_type::standard> -using map = - detail::table>, Bucket, false>; +using map = detail::table>, + Bucket, + detail::default_container_t, + false>; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class Bucket = bucket_type::standard> -using segmented_map = - detail::table>, Bucket, true>; +using segmented_map = detail::table>, + Bucket, + detail::default_container_t, + true>; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class Bucket = bucket_type::standard> -using set = detail::table, Bucket, false>; +using set = detail::table, + Bucket, + detail::default_container_t, + false>; ANKERL_UNORDERED_DENSE_EXPORT template , class KeyEqual = std::equal_to, class Bucket = bucket_type::standard> -using segmented_set = - detail::table, Bucket, true>; +using segmented_set = detail::table, + Bucket, + detail::default_container_t, + true>; } // namespace pmr @@ -2006,11 +2071,15 @@ ANKERL_UNORDERED_DENSE_EXPORT template // NOLINTNEXTLINE(cert-dcl58-cpp) -auto erase_if(ankerl::unordered_dense::detail::table& map, - Pred pred) -> size_t { - using map_t = ankerl::unordered_dense::detail::table; +auto erase_if( + ankerl::unordered_dense::detail::table& + map, + Pred pred) -> size_t { + using map_t = ankerl::unordered_dense::detail:: + table; // going back to front because erase() invalidates the end iterator auto const old_size = map.size(); diff --git a/Source/Base/tests/VariableContainer_UT.cpp b/Source/Base/tests/VariableContainer_UT.cpp index 297022d04..0f0afe176 100644 --- a/Source/Base/tests/VariableContainer_UT.cpp +++ b/Source/Base/tests/VariableContainer_UT.cpp @@ -7,8 +7,6 @@ using nc::base::variable_container; #define PREFIX "variable_container " -static_assert(sizeof(variable_container) == 64); - TEST_CASE(PREFIX "Common storage") { variable_container vc(variable_container<>::type::common);