Commit graph

10 commits

Author SHA1 Message Date
Michael Fabian 'Xaymar' Dirks
08544b4116 cmake, code: Abuse pre-processor to disable/enable warnings 2023-04-05 18:58:39 +02:00
lainon
6e1566386e project: Apply more C++ paradigms to the code
- Use auto in places where code clarity is improved or identical.
- Replace trivial constructors and destructors with default.
- Use true random for random generation.
- Use std::string_view where it is valid to do so.
- Apply const where it is valid to do so.
- Use references where it is valid to do so.
- Manually optimize memory usage with std::move and std::copy.
- Opt for memory efficient containers where the size is known ahead of time.

Signed-off-by: lainon <GermanAizek@yandex.ru>
2023-04-05 18:58:32 +02:00
Michael Fabian 'Xaymar' Dirks
2ccbd76c02 util/library: Don't mix incompatible parameters 2023-04-05 18:51:37 +02:00
Michael Fabian 'Xaymar' Dirks
25dc14f805 util/library: Load wstring instead of string 2023-04-05 18:51:33 +02:00
Michael Fabian 'Xaymar' Dirks
a56f3816a1 util/library: Force specific search directories 2023-04-05 18:51:31 +02:00
Michael Fabian 'Xaymar' Dirks
b4c7d5f91c util/library: Convert paths to native format 2023-04-05 18:51:06 +02:00
Michael Fabian 'Xaymar' Dirks
d62da72ce5 util: Apply coding guidelines 2023-04-05 18:50:57 +02:00
Michael Fabian 'Xaymar' Dirks
0a71af9d6a util/library: Fix unicode support
Related: #359
2023-03-28 13:11:04 +02:00
Michael Fabian 'Xaymar' Dirks
7e7ed80a9a util/library: Use string_view instead of string
Slightly improves performance and reduces memory impact, as string data is not duplicated.
2023-03-28 13:11:03 +02:00
Michael Fabian 'Xaymar' Dirks
a39fd89ba7 util/library: Cross-platform handler for library loading
Adds a utility class and functions to load libraries and symbols from libraries somewhat safely. Libraries are immediately unloaded when the last reference to them is lost, so the shared_ptr should be stored if the library is actually needed.
2023-03-28 12:52:23 +02:00