Shauren
2c74626e66
Core/Random: Use standard aligned operator new and remove RandomEngine singleton instance (it is trivially constructible)
2025-07-09 12:20:10 +02:00
Shauren
e8b2be3527
Core/Network: Socket refactors
...
* Devirtualize calls to Read and Update by marking concrete implementations as final
* Removed derived class template argument
* Specialize boost::asio::basic_stream_socket for boost::asio::io_context instead of type-erased any_io_executor
* Make socket initialization easier composable (before entering Read loop)
* Remove use of deprecated boost::asio::null_buffers and boost::beast::ssl_stream
2025-04-08 19:15:16 +02:00
Shauren
b267129ae0
Core/Misc: Simplify Trinity::invocable_r concept
2025-04-02 22:22:03 +02:00
Shauren
476b8951e1
Core/Utils: Allow using Trinity::IteratorPair with SelectRandomContainerElement
2025-01-21 12:58:43 +01:00
Shauren
d778d5ec7c
Core/Misc: Include cleanup - remove MapUtils.h from Containers.h
2024-12-31 18:12:36 +01:00
Shauren
380dac62fd
Core/Misc: Add concepts restrictions on container utilities for better compiler error messages
2024-12-31 13:35:35 +01: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
a53e4a5756
Core/Misc: Replace enable_if overload selection with if constexpr
2023-01-07 22:38:21 +01:00
Shauren
0f40af64e6
Core/Utils: Corrected included files in Containers.h
2022-02-11 22:14:47 +01:00
Shauren
08b5a0586a
Core/Util: Added iterator range overload for Trinity::Containers::RandomShuffle
2022-01-03 12:48:40 +01:00
Treeston
a6332f5dec
Core/Misc: C++17 cleanups, commit 3, the header commit
...
(cherry picked from commit ca0c50bc45 )
2021-12-24 00:37:25 +01:00
Treeston
ea0aa63d96
Core/Misc: C++17 cleanups, commit 2, the advstd commit
...
(cherry picked from commit 857f8d9231 )
2021-12-24 00:37:21 +01:00
Shauren
b93bf95f2e
Core/Random: Refactor random number generation to use std::uniform_*_distribution to restrict result range instead of doing that ourselves
...
* Seed SFMTRand with more values for its state
(cherry picked from commit 73bc3d8ea4 )
2021-12-19 00:13:11 +01:00
Treeston
3388cea685
Core/Misc: Remove Trinity::Containers::Size (duplicate of advstd::size)
...
(cherry picked from commit f1d9a36c5f )
2021-12-17 21:57:41 +01:00
Treeston
611ddfee3c
build fix after d1dc0e2
...
(cherry picked from commit c0f8e8535a )
2021-12-16 22:16:07 +01:00
Treeston
549d5fea31
Core/Utils: some code style adjustments, 6d6077e follow-up
...
(cherry picked from commit 4c3af3b636 )
2021-11-16 21:05:35 +01:00
Treeston
4f8fd56903
Core/Utils: Fix Unicode handling
...
(cherry picked from commit 6d6077e36f )
2021-11-16 21:04:53 +01:00
Treeston
839d30e93b
Common/Containers: Eliminate a edge case that could potentially lead to object invalidation.
...
(cherry picked from commit 64a61e03ab )
2021-10-15 00:10:10 +02:00
Shauren
31ef525ecd
Core/Misc: Add container utility function Trinity::Containers::EnsureWritableVectorIndex to replace if (i >= vec.size()) vec.resize(i + 1) copypaste everywhere
2021-06-13 00:59:15 +02:00
Treeston
94e164f9c9
Utilities/Containers: New RandomResize implementation with guaranteed asymptotic linear time for all container types ( #19974 )
...
(cherry picked from commit ac50034df7 )
2020-08-18 18:53:13 +02:00
Aokromes
b0bf1275ee
New Year
2020-01-02 06:44:10 +01:00
vincent-michael
5620eb9463
Update copyright note for 2019
...
auto happy = new year(2019);
2019-01-01 10:14:33 +01:00
Shauren
3f1197855f
Core/Utils: Avoid unneccessary container copy
2018-11-07 20:27:22 +01:00
Shauren
91be2332e2
Core/Entities: Phasing rewrite
...
* Optimized phase visibility checking
* Handle all phase flags
Closes #16758
Closes #21119
2018-03-25 19:28:36 +03:00
vincent-michael
7d00ae4045
Update copyright note for 2018
...
auto happy = new year(2018);
2018-01-01 00:40:17 +01:00
Shauren
fdd9227b23
Core/Misc: Util changes
...
* Move IteratorPair to its own header
* Add AsUnderlyingType function to cast enum value to its underlying type (avoids repeating std::underlying_type everywhere)
2017-07-23 23:32:20 +02:00
ariel-
555fc9d3d5
Core/Utils: restored previous behaviour of RandomResize
...
(cherry picked from commit 8188511759 )
2017-06-05 03:47:14 -03:00
Shauren
f097e341f5
Core/Utilities: Rename RandomResizeList->RandomResize as it is no longer restricted to a list
...
* Also fix gcc build
2017-03-23 00:11:58 +01:00
Shauren
a1e3b54e07
Core/Utils: Changed all Trinity::Containers utilities to work on all container types (including arrays where it makes sense)
...
* Added MapGetValuePtr to allow writing `if (Val* v = MapGetValuePtr(map, key))`
* Added utility IteratorPair class with begin/end methods and MapEqualRange for use in range for syntax with multimaps
2017-03-21 21:04:01 +01:00
vincent-michael
86b98686a9
Update copyright note for 2017
...
Happy new year
2017-01-01 16:23:13 +01:00
Shauren
cd28d23ed8
Build fix
2016-10-22 13:28:58 +02:00
Shauren
59fe908744
Core/Random: Remove no longer needed hack for VS 2013
2016-09-01 11:52:08 +02:00
Shauren
a6205e4035
Core/Containers: Warning fixes and RandomResizeList with predicate optimization
...
(cherry picked from commit 0fbfa8ead0 )
2016-05-24 18:52:34 +02:00
joschiwald
803473fb64
Core/Utils: replaced std::random_shuffle with our own implementation using SFMT random generator
...
(cherry picked from commit 9e371b766c )
2016-04-24 20:19:42 +02:00
Naios
501fd9b502
Core/Common: Converted the common library to a shared library.
...
* There is still the possibility to static link against common.
2016-03-24 01:28:58 +01:00
Shauren
d5b0ffbe9b
Core/Misc: Added safeguard against generating invalid selection weight data in Trinity::Containers::SelectRandomWeightedContainerElement
2016-01-23 11:34:47 +01:00
Shauren
bc94bacce4
Core/Misc: Build fix for clang & libc++
2016-01-09 01:38:59 +01:00
DDuarte
ff9c999334
Core/Utilities: Fix build in some versions of Ubuntu / GCC
...
Closes #16125
2016-01-03 20:39:13 +00:00
Shauren
00c878e73a
Core/Misc: Build fix for older gcc
2016-01-02 18:45:01 +01:00
Vincent-Michael
478cc756eb
Update copyright note for 2016
...
Happy new year (Again new year with idiots ...)
2016-01-01 00:34:25 +01:00
Shauren
9ab10d6e68
Core/Misc: VS 2013 build fix - horrible hack.
2015-12-27 01:21:30 +01:00
Shauren
921d893c2a
Build fix
2015-12-26 00:33:14 +01:00
Shauren
ae20b2ab56
Core/Utils: Moved rng functions to separate header and added utility functions to select a random element from a container where each element can have different chance of being selected
2015-12-24 19:48:39 +01:00