Commit Graph
651 Commits
Author SHA1 Message Date
MihailRis 3d3da1cdcd refactor World 2024-08-11 16:30:58 +03:00
MihailRis de5c75d782 replace include guards with pragma once 2024-08-10 01:57:59 +03:00
MihailRis f43cc93cd2 update project includes format 2024-08-10 01:37:48 +03:00
alexei-zebra 91ad9cc64c add compatibility with other files 2024-08-06 15:51:55 +03:00
MihailRis 6a86282d31 fix input.add_callback 2024-08-06 13:49:22 +03:00
InfiniteCoder 6e8c671e82 Controversial 2024-08-06 00:18:17 +03:00
InfiniteCoder 85239004e3 window/ 2024-08-06 00:07:33 +03:00
InfiniteCoder f66d0ce7fd physics/ 2024-08-06 00:07:00 +03:00
InfiniteCoder 54f15ecaea maths/ 2024-08-06 00:06:23 +03:00
InfiniteCoder 79ccde35b7 lighting/ 2024-08-06 00:05:41 +03:00
InfiniteCoder eb6bb19dc6 interfaces/ 2024-08-06 00:04:32 +03:00
InfiniteCoder 9283aa605f frontend/ 2024-08-06 00:01:27 +03:00
InfiniteCoder 8f9c7eb7ff data/ 2024-08-05 23:59:42 +03:00
InfiniteCoder 3b6e7d1877 audio/ 2024-08-05 23:58:14 +03:00
InfiniteCoder 9f9b9f2d64 world/ 2024-08-05 23:49:11 +03:00
InfiniteCoder 9340e962d3 Controversial 2024-08-05 23:26:43 +03:00
InfiniteCoder 7f75c454c8 logic/ 2024-08-05 23:23:28 +03:00
InfiniteCoder c7755040bd voxels/ 2024-08-04 22:42:44 +03:00
InfiniteCoder 5c9bc83bbd items/ + objects/ + util/ 2024-08-04 22:26:08 +03:00
InfiniteCoder eb061bcaf4 graphics/ 2024-08-04 22:12:48 +03:00
InfiniteCoder f837bc5158 Merge remote-tracking branch 'origin/main' 2024-08-04 22:04:23 +03:00
InfiniteCoder 3aa0298c85 files/ 2024-08-04 17:08:11 +03:00
MihailRis e45f63c315 fix: camera shaking while paused 2024-08-04 16:53:05 +03:00
InfiniteCoder e6da3638f0 Logger.hpp 2024-08-04 12:46:03 +03:00
InfiniteCoder e1e3456139 content/ 2024-08-04 12:45:08 +03:00
InfiniteCoder a745507ddd coders/ 2024-08-04 11:23:08 +03:00
InfiniteCoder 21ff65d781 assets/ 2024-08-04 11:08:07 +03:00
InfiniteCoder d5dc68dd38 Root includes 2024-08-04 10:24:11 +03:00
MihailRis 47db626145 refactor: PVS-Studio warnings fixes 2024-08-04 01:30:52 +03:00
MihailRis 245b39be62 refactor: PVS-Studio warnings fixes 2024-08-04 01:12:42 +03:00
Vyacheslav Ivanov 815ba45747 Merge remote-tracking branch 'origin/pvs-fix' into pvs-fix 2024-08-03 23:15:15 +03:00
Vyacheslav Ivanov 3621e7ce1b fix: PVS-Studio V522 mark false
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 23:00:10 +03:00
MihailRis e014931e1e fix: selection update latency 2024-08-03 22:36:18 +03:00
Vyacheslav Ivanov 4efa574eec fix: PVS-Studio V508 mark false
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 21:05:19 +03:00
Vyacheslav Ivanov bbf33e8e4d format: reformat project
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 19:53:48 +03:00
Vyacheslav IvanovandMihailRis 5e70837d3f fix: optimization: PVS-Studio warning V815
The 'empty()' method is more efficient for checking if a string is empty compared to comparing it with an empty string literal.

The default constructor 'std::wstring()' is more efficient for creating an empty string compared to using a string literal.

The 'clear()' method is more efficient for clearing a std::wstring compared to assigning it an empty string literal.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:50:58 +03:00
Vyacheslav IvanovandMihailRis 26ff0f133a fix: optimization: PVS-Studio warning V821
Creating variables in a more localized scope can enhance performance and make the code easier to understand.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:50:04 +03:00
Vyacheslav IvanovandMihailRis 3fa7fac4df fix: optimization: PVS-Studio warning V830
Replaced 'std::optional::value()' with '*' operator to improve performance.

Using 'std::optional::value()' involves additional overhead compared to using the '*' or '->' operators. This change ensures more efficient access to the underlying value of the optional when you are certain that it contains a value.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:47:15 +03:00
Vyacheslav IvanovandMihailRis 8c5e5559ec fix: optimization: PVS-Studio warning V831
Replaced 'at()' method with 'operator[]' to improve performance.

The 'at()' method performs bounds checking, which can introduce overhead. Using 'operator[]' bypasses this check and can improve performance when you are certain that the index is within bounds.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:46:29 +03:00
Vyacheslav IvanovandMihailRis 97a0bb5776 fix: optimization: PVS-Studio warning V835
Passing cheap-to-copy arguments by reference can sometimes lead to decreased performance. This change ensures that the argument is passed by value, which is more efficient in cases where the argument is inexpensive to copy.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:46:13 +03:00
Vyacheslav IvanovandMihailRis aecd0f5db9 fix: optimization: PVS-Studio warning V832
It's better to use '= default;' syntax instead of empty constructor and destructor body.
Using '= default;' can help the compiler generate more optimal code.

Reported by: PVS-Studio

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:44:10 +03:00
Vyacheslav IvanovandMihailRis c858913a2f fix: optimization: PVS-Studio warning V807
Created references to avoid using repeated expressions, improving performance across multiple instances.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-03 17:43:12 +03:00
MihailRisandGitHub ba046a52c0 Revert "fix: optimization: Various PVS-Studio warnings" 2024-08-02 14:51:44 +03:00
Vyacheslav Ivanov c4cc71623d fix: optimization: PVS-Studio warning V807
Created references to avoid using repeated expressions, improving performance across multiple instances.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 06:07:50 +03:00
Vyacheslav Ivanov 2c1103307f fix: optimization: PVS-Studio warning V813
Passing large objects by const reference avoids unnecessary copying and enhances efficiency.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 05:35:55 +03:00
Vyacheslav Ivanov 5b325ac2bc fix: optimization: PVS-Studio warning V815
The 'empty()' method is more efficient for checking if a string is empty compared to comparing it with an empty string literal.

The default constructor 'std::wstring()' is more efficient for creating an empty string compared to using a string literal.

The 'clear()' method is more efficient for clearing a std::wstring compared to assigning it an empty string literal.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 05:35:55 +03:00
Vyacheslav Ivanov 6b3146f98a fix: optimization: PVS-Studio warning V821
Creating variables in a more localized scope can enhance performance and make the code easier to understand.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 05:35:53 +03:00
Vyacheslav Ivanov e9a5f18bc3 fix: optimization: PVS-Studio warning V830
Replaced 'std::optional::value()' with '*' operator to improve performance.

Using 'std::optional::value()' involves additional overhead compared to using the '*' or '->' operators. This change ensures more efficient access to the underlying value of the optional when you are certain that it contains a value.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 02:38:54 +03:00
Vyacheslav Ivanov f3f872c7a3 fix: optimization: PVS-Studio warning V831
Replaced 'at()' method with 'operator[]' to improve performance.

The 'at()' method performs bounds checking, which can introduce overhead. Using 'operator[]' bypasses this check and can improve performance when you are certain that the index is within bounds.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 02:38:54 +03:00
Vyacheslav Ivanov 1bdc9cf759 fix: optimization: PVS-Studio warning V835
Passing cheap-to-copy arguments by reference can sometimes lead to decreased performance. This change ensures that the argument is passed by value, which is more efficient in cases where the argument is inexpensive to copy.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 02:38:54 +03:00