aboutsummaryrefslogtreecommitdiff
path: root/src/common/Utilities
AgeCommit message (Collapse)Author
2022-03-09Core/Utilities: Fixed child process console output being incorrectly cut off ↵Shauren
at first newline
2022-03-09Core/Console: Improve ReadWinConsole logic and cosmetic changes (#26402)Mikhail Redko
* Core/Console: Improve ReadWinConsole logic and cosmetic changes * Core/Console: Fixed possible appearance of weird characters in the console when printing the output of child processes * Fix codestyle * Removed auto * Core/Misc: Explicit casting Difficulty values to uint8 before outputting to console * Core/Misc: Cast Difficulty to uint32 for output to console Co-authored-by: jackpoz <giacomopoz@gmail.com> (cherry picked from commit 6c12f45f3b7d7eab32ed29860d2261fc8a512f0e)
2022-03-08Core/Console: Fix uninitialized variableShauren
(cherry picked from commit 677952fbc59676b549337f9f7eb5c7e7abb1135e)
2022-03-08Core/Misc: Fixed utf8 encoding in console input/output. (#26352)Mikhail Redko
* Core/Misc: Fixed utf8 encoding in console input/output. * Fix gcc build * Fixed that weird 'a' with circle above it and other similar letters. Also fixed encoding in AppenderConsole which sometimes did not work as it should * Fix build on Linux * Probably better to do it like this (cherry picked from commit 1539bed3db86f2153f2d0d5fbf24bf9ee4af1d92)
2022-03-06CI/CircleCI: Expose binaries built on Circle CI as docker images in the ↵Giacomo Pozzoni
Circle CI artifacts (#25832) Co-authored-by: Shauren <shauren.trinity@gmail.com> (cherry picked from commit 9af6bf15aa2fe836c3ebba306eaaa8971f00fac4)
2022-03-05Core/Misc: Remove unneeded null-terminator after switch from wchar_t to ↵Mikhail Redko
std::wstring in 309851e. Fixes creation characters with declined russian names (#25797) Closes #23775 (cherry picked from commit eaa22b8a1722fd362bf5ef2c6944b5c50b121afd)
2022-02-13Core/Misc: Cleanup unused includesShauren
2022-02-11Core/Utils: Corrected included files in Containers.hShauren
2022-02-10Core/Utils: Made bool conversion operator of FlagsArray explicitShauren
2022-02-09Core/Utils: Extract template base class out of flag128Shauren
2022-02-05[3.3.5] Core/ChatCommands: Show error messages from argument parsers (PR #25443)Treeston
(cherry picked from commit 75f9e7396e35360f3016cc0cb21e72e20f5d96d5)
2022-02-05Dep/fmt: update fmt library to 7.0.3Winfidonarleyan
(cherry picked from commit 9d96e4852a4a25fdc323f656e24034fa1a280826)
2022-02-05Core/ChatCommands: make ExactSequence more readableTreeston
(cherry picked from commit feaaa595cae735bb6093b24a88562c27b2723cfe)
2022-02-04Common/Util: Trinity::StringTo<double> support (PR #25364)Treeston
(cherry picked from commit f45aa5cac1579e87cbc599ffb58e10e662066792)
2022-02-04Core/Misc: Add support for custom link colors. Clean-up hyperlink ↵Treeston
validation, no more long-ass defines. Remove UI.ShowQuestLevelsInDialogs. (cherry picked from commit eaf8fa75a1c76131ecbf2585db6d6236b7334b8e)
2022-02-04Common/Utilities: Make StringTo<bool>'s signature match that of the other ↵Treeston
integral types, making for easier templating. Default behavior unchanged. (cherry picked from commit f54cec4db7c67b623383c140159e1171876ace89)
2022-02-04Core/Common: Tokenizer -> Trinity::Tokenize (PR: #25327)Treeston
(cherry picked from commit 534a2388b7c662c8796aabb1ec8cb424879799b6)
2022-02-04Common/Utilities: Properly read std::from_chars documentation and check for ↵Treeston
out_of_range errors. (cherry picked from commit 7478c2c65aea853a2086c9c7ecc56c14ad6ee338)
2022-02-04Common/Utilities: Centralize string -> T conversion in StringConvert.h (PR ↵Treeston
#25335) (cherry picked from commit cd30e0b86ce6ee88386a91cebdf353fc55805c57)
2022-02-04Common/Utilities: Move EnumUtils' implementation struct from Trinity::Impl ↵Treeston
to Trinity::Impl::EnumUtilsImpl. This avoids confusing name clashes for other implementations in sub-namespaces of Trinity::Impl. (cherry picked from commit 91744de3162bab23d7c5a0dd65fc8b4249eb803a)
2022-02-04Core/Misc: std::string -> std::string_view in a bunch of places, notably ↵Treeston
chat commands and Util.h (cherry picked from commit a41bbd9ad9adedb15c7133bdef1575a6ec0eb1ab)
2022-02-03Core/Util: Added another template utility - find_type_ifShauren
* Trinity::find_type_if - Find a type matching predicate in a given template parameter pack (cherry picked from commit 84a87d87bfd569192ff1564e3d8b2e68d5fff4bc)
2022-02-03Core/Util: Added new utilitiesShauren
* Trinity::new_from_tuple - same as std::make_from_tuple except allocates object using "new" * Trinity::is_tuple - detects whether given type is a tuple specialization * advstd::type_identity - C++20 std::type_identity (cherry picked from commit 7c08fc863ac45f2d41b18103b0132004a4c0c524)
2022-02-03Core/ChatCommands: Check whether a passed numeric enum value is valid (#25285)Peter Keresztes Schmidt
(cherry picked from commit 4286e7aa02e777268b25d8a5bcc1ee87f7b16c4d)
2022-01-26Core/ChatCommands: Add support for enum type arguments (PR #25242)Peter Keresztes Schmidt
(cherry picked from commit 5e40eb20e2789b86d4786d86b4bbb8ae83de5e1e)
2022-01-26Core/Warden: Warden refactors (PR #25235)Treeston
(cherry picked from commit 6116e5b38522ccfb00f6c941c75482e05b4c0799)
2022-01-26Core/Common: Move old-style pointer+size HexStr methods to Trinity::Impl ↵Treeston
where they can't hurt anyone (cherry picked from commit 7b8b999516a824b0c417631a77f133eb47b8b2f4)
2022-01-24Core/Common: Merge TimeTrackerSmall with TimeTrackerCarbenium
(cherry picked from commit 228696bf80bcd55d35445cd24ae119020c310f88)
2022-01-24Core/Common: Add a std::chrono interface to TimeTrackerSmallCarbenium
New methods: TimeTrackerSmall(Milliseconds expiry); void Update(Milliseconds diff); void Reset(Milliseconds expiry) Milliseconds GetExpiry() const Removed methods: int32 GetExpiry() const Also add basic unit tests. Core/Scripts: Use std::chrono interface of TimeTrackerSmall (cherry picked from commit e55516348dbabaa8c9d559426315f3f70967acaa)
2022-01-24Core/Misc: Fix static analysis issues (#25178)Giacomo Pozzoni
(cherry picked from commit 7cf122fc2a604bae77d0b935536c41ec9203e62d)
2022-01-24Core/EventProcessor: std::chrono-ify the remaining public APICarbenium
(cherry picked from commit 1d8782e3566393f71fbc091de57c96a9a15972cb)
2022-01-24Core/EventProcessor: std::chrono-ify CalculateTimeCarbenium
uint64 CalculateTime(uint64 t_offset) has been replaced with Milliseconds CalculateTime(Milliseconds t_offset). Also add the std::chrono-ified overload void AddEvent(BasicEvent*, Milliseconds, bool) (cherry picked from commit 92a02a5c8750913f596d7e3b58bf8439cb770c28)
2022-01-24Core/EventMap: Clarify documentation of ScheduleEventCarbenium
(cherry picked from commit 7865c1c197f4eb9165ef3ab26eb4f750a5b58960)
2022-01-24Core/EventMap: Unify semantics of DelayEventsCarbenium
DelayEvents(Milliseconds delay) had different semantics than DelayEvents(Milliseconds delay, uint32 group). The first method delayed the events only in the case the internal timer already ticked at least for the amount of delay. In contrast the latter method delayed events regardless of the internal timer value. Use the latter semantics for DelayEvents(Milliseconds delay) as well which makes the outcome more predictable. Adapt tests accordingly. (cherry picked from commit 4470b9122379dc846b322a441951a03913912b71)
2022-01-23EventMap: Change GetTimeUntilEvent to return std::chrono typesCarbenium
(cherry picked from commit 8cb35b0d5f1462387033e6bd2f99d0ea829fdcd8)
2022-01-23EventMap: Switch internal timer over to std::chrono typeCarbenium
Adds the EventMap::Update(Milliseconds time) overload (cherry picked from commit b9795e44824c7cab58445e4a72d2113ddb451caa)
2022-01-23Core/Utilities: Add custom _days chrono literalCarbenium
(cherry picked from commit d5de96e46bf52ccb2fffe01c0709f9238977a80e)
2022-01-23EventMap: Remove GetNextEventTime and GetTimer methods (PR #25092)Peter Keresztes Schmidt
(cherry picked from commit 6ab9922171cf6e2877c39f503bcf987dd9faa898)
2022-01-23TaskScheduler: use randtime instead of custom implementationCarbenium
(cherry picked from commit f773bf68e0f96a97b706f366da4071ba28060b04)
2022-01-23Core/Threads: Replace Boost TLS with C++11 one (#15782)Giacomo Pozzoni
* Core/Threads: Replace Boost TLS with C++11 one Replace boost::thread_specific_ptr<T> thread-local storage with C++11 thread_local to remove libboost_thread dependency from common project * Fix no-pch build (cherry picked from commit 00b16992f1ae3bf14ab5fe6366028a2b8648bfa0)
2022-01-23Core/Time: Rename GetGameTime{System, Steady}Point methodsTreeston
The names are a bit unhandy. Rename them (shorter but still meaningful). GetGameTimeSystemPoint() -> GetSystemTime() GetGameTimeSteadyPoint() -> Now() Also add 2 new typedefs: typedef std::chrono::steady_clock::time_point TimePoint; typedef std::chrono::system_clock::time_point SystemTimePoint; Closes #25042 (cherry picked from commit 896b68d5c297b06587645caebc98b704978ecaa7)
2022-01-23Nopch fixShauren
(cherry picked from commit c0ade2e98fbc6cc129b4725d2216016f90996e8b)
2022-01-23Dep: Switch to boost process instead of old standalone versionShauren
(cherry picked from commit 524d16739861d0b2279e2270e319b0c77ec9b03b)
2022-01-23Core/Misc: Replace boost::optional with std::optional (#25047)Peter Keresztes Schmidt
C++17 is already mandatory, so it's a safe thing to do (cherry picked from commit 202fd41389973322f63186fd8e5a368fce3e1b04)
2022-01-23Core/Util: Remove EventMap's non-std::chrono::duration based interface (#25049)Peter Keresztes Schmidt
Closes #25012 (cherry picked from commit ce1e2c0f9b4f80e1fa5c448ee12fec43204a3634)
2022-01-21Core/Misc: Fixed engrish in static_assert for EnumFlag and restrict ↵Shauren
DEFINE_ENUM_FLAG to enums only (with std::is_enum)
2022-01-03Core/Util: Added iterator range overload for Trinity::Containers::RandomShuffleShauren
2022-01-01Core/SAI: Allow SMART_TARGET_ACTION_INVOKER to target GameObjects (#24416)Giacomo Pozzoni
* Core/SAI: Allow SMART_TARGET_ACTION_INVOKER to target GameObjects * Include new Coalesce(..) template by @Shauren (cherry picked from commit 90b00288c24dfefccb338bd33b025cf85e82076d)
2021-12-24Core/Misc: C++17 cleanups, commit 3, the header commitTreeston
(cherry picked from commit ca0c50bc450f5259acc6af0f4123690969b7e9cb)
2021-12-24Core/Misc: C++17 cleanups, commit 2, the advstd commitTreeston
(cherry picked from commit 857f8d9231d148d4f2def9c83548b40059923029)