Commit Graph

224 Commits

Author SHA1 Message Date
Shauren
fff12eafdf Core/Common: Catch and log child process creation errors 2024-09-23 14:17:33 +02:00
Shauren
f270686201 Core/Common: Output stdout/stderr from child process without waiting for it to finish 2024-09-14 14:45:40 +02:00
Shauren
dbe8d1f11e Core: Remove boost iostreams dependency 2024-09-14 13:50:56 +02:00
Shauren
81bec6954f Core/Logging: Minor internal refactor
* Avoid formatting to output with fprintf
* Use vector instead of unordered_map to store appenders in Logger
2024-07-16 16:31:40 +02:00
Shauren
054dd3596f Core/Utils: Transform char toUpper/toLower functions into callable function objects to better integrate with std algorithms (not calling through a function pointer allows inlining) 2024-07-14 13:12:10 +02:00
Shauren
83f4763b25 Core/Misc: Minor change to make_unique_ptr_with_deleter to make it accept only pointers 2024-05-07 12:26:21 +02:00
Shauren
2aedd8ecdb Dep/fmt: Upgrade to 10.2.1 2024-05-03 19:38:57 +02:00
Shauren
39fc9f8000 Core/Misc: Minor fixes in preparation to support fmt v10 2024-05-02 19:46:18 +02:00
lee
5c4b1ace41 Build: Fix Linux aarch64 GCC build (#29831)
(cherry picked from commit 370685457e)
2024-03-27 10:50:42 +01:00
Shauren
f690b69338 Core/Utils: unique_trackable_ptr improvements
* Added comparison operators
* Added type casting helper functions
2024-03-13 17:04:26 +01:00
Shauren
6b255efb2d Core/Utils: Added missing member access in unique_trackable_ptr move assignment operator 2024-03-12 21:02:28 +01:00
Shauren
1f3ebbb23c Fix tests build 2024-03-11 18:25:17 +01:00
Shauren
32e54b6bd1 Core/Utils: Added a custom smart pointer type unique_trackable_ptr - a specialized variant of std::shared_ptr that enforces unique ownership
* This is intended to be used by external code unable to track object lifetime such as custom scripting engines
2024-03-11 18:16:34 +01:00
Shauren
20b29c5ff5 Core/Misc: Allow formatting optionals with Trinity::StringFormat 2024-02-28 20:42:20 +01:00
Shauren
b9c2dca59f Core/Random: Use correct headers to obtain _mm_malloc definitions 2024-02-17 12:03:06 +01:00
Shauren
acb5fbd48b Core/Bnet: Rewrite LoginRESTService using boost::beast instead of gsoap as http backend and extract generic http code to be reusable elsewhere 2023-12-17 23:21:10 +01:00
Shauren
6e147f617b Core/Locales: Fixed mac build
Closes #29490
2023-12-12 11:59:56 +01:00
Shauren
78bcc3f52a Core/Misc: Minor code modernization - kill std::bind 2023-12-08 20:27:41 +01:00
Shauren
333630b7de Core/Misc: Added windows version checks during startup to avoid confusion about crashes when running on unsupported OS 2023-12-01 19:53:13 +01:00
Shauren
1c6ee8a6bd Core/Locales: Revert back to using C locale for number formatting 2023-11-25 13:57:25 +01:00
Shauren
b299902881 Core/Locales: Set active code page and locale used by c string functions to utf8
Closes #29455
2023-11-24 20:01:17 +01:00
Shauren
b888b1b09f Core/Calendar: Implement different timezone support for ingame calendar
Closes #8390
Closes #29427
2023-11-21 12:25:22 +01:00
ModoX
c5735edcc8 Core/Utilities: Added timer series queuing to EventMap (#29420) 2023-11-10 20:15:37 +01:00
Shauren
9894f6b802 Core/Random: Changed random functions returning doubles to return floats
* They were all cast to float at use anyway
* Improves roll_chance_f performance (rand32() is now called internally by uniform_real_distribution once instead of twice)
2023-10-31 20:20:00 +01:00
funjoker
17c69368a3 Dep/Boost: Drop windows boost hacks (#29358) 2023-10-13 21:10:01 +02:00
Shauren
e161874695 Core/Realms: Replaced hardcoded realm category list with Cfg_Categories.db2 2023-10-05 23:57:25 +02:00
Shauren
752309fbe3 Core/Misc: mac build fix 2023-09-17 01:07:27 +02:00
Shauren
d8c98579d4 Core/Misc: Silence compile warning in boost::process with version 1.83 2023-09-13 00:29:25 +02:00
Shauren
f0a862e71b Core/Misc: Modernize comparison operators 2023-08-24 00:51:26 +02:00
Shauren
576ca241ec Core/Logging: Minor compile time reducing refactor of log message formatting 2023-07-23 00:27:26 +02:00
Shauren
dfbf09f4b9 GCC build fix 2023-07-17 20:32:07 +02:00
Shauren
3260b94dd6 Core/Misc: Replace string to int conversion functions from Common.h with c++17 std::from_chars based ones Trinity::StringTo 2023-05-13 15:46:27 +02:00
Gosha
eb7f02849c Core/Misc: TaskScheduler cleanup (#28862)
-Pass std::chrono types by value, they are small enough to not be passed around by const&
-Same applied to Optional<group_t>
-Replace EmptyCallback with nullptr

Co-authored-by: Shauren <shauren.trinity@gmail.com>
2023-05-06 23:59:37 +02:00
Shauren
083b8d6c84 Core/Misc: Fix build with libc++
Closes #28909
2023-04-10 00:08:32 +02:00
Shauren
7b31080258 Core/Misc: Modernize code a bit by replacing std::tie with either structured bindings or operator<=> 2023-04-06 17:46:58 +02:00
Shauren
7395d75b5a Core/Misc: Fixed clang 15 warnings 2023-01-31 18:51:31 +01:00
Shauren
eab14dc66a Core/Logging: Fixed remaining uses of STRING_VIEW_FMT in log statements 2023-01-10 19:15:10 +01:00
Shauren
17b20a3353 Dep/fmt: Upgrade to 9.1.0 2023-01-08 22:03:44 +01:00
Shauren
d791afae1d Core/Logging: Switch from fmt::sprintf to fmt::format (c++20 standard compatible api) 2023-01-08 21:16:53 +01:00
Shauren
a53e4a5756 Core/Misc: Replace enable_if overload selection with if constexpr 2023-01-07 22:38:21 +01:00
Shauren
7830e5a7a1 Core/Misc: Migrate our c++20 advstd to standard features 2023-01-07 22:38:21 +01:00
Shauren
e8e330addd Core/Misc: Remove boost::heap::fibonacci_heap from header files 2023-01-06 16:54:16 +01:00
Shauren
585900f42d Core/Misc: Added a include hack for msvc <chrono> to use only c++17 bits from it 2023-01-05 12:16:21 +01:00
Shauren
fc37c42e55 Core/Misc: Added noexcept to move constructors and move assignment operators 2022-11-06 01:03:35 +01:00
Shauren
c9f1606b76 Build: Cleanup boost CMakeLists from pre-c++11 flag checks 2022-11-05 01:08:17 +01:00
Lloyd Dilley
1c36441b7c Core/Misc: Fix *BSD compile errors (#28287)
(cherry picked from commit 2b8fc95fde)
2022-10-01 17:33:25 +02:00
Shauren
301572212f Core/Misc: Changed string formatting functions to accept std::string_view as format argument instead being templated on it to slightly improve compile times and reduce executable size 2022-09-19 00:33:19 +02:00
Shauren
eafc5214b2 Core/Misc: Minor refactor to std::hash specialization for std::pair to avoid showing incorrect documentation in IDEs on entire std namespace 2022-09-02 21:25:36 +02:00
Shauren
5859510b54 Core/Utils: Added helper function to make creating unique_ptr with custom deleters more convenient 2022-06-17 15:20:55 +02:00
Shauren
a5f107dafc Core/Utilities: Fixed child process console output being incorrectly cut off at first newline 2022-03-09 16:22:04 +01:00