Commit Graph
2278 Commits
Author SHA1 Message Date
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
Vyacheslav Ivanov 307ffc3c8f fix: optimization: PVS-Studio warning V837
Replaced 'emplace' with 'try_emplace' to avoid unnecessary copies or moves when insertion fails.

The 'emplace' function does not guarantee that arguments will not be copied or moved if insertion is not successful. Using 'try_emplace' ensures that arguments are only copied or moved if the insertion actually takes place, thus improving performance.

Reported by: PVS-Studio
Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 02:38:54 +03:00
Vyacheslav Ivanov 7fbd32b8df fix: optimization: PVS-Studio warning V823
Replaced 'push_back' with 'emplace_back' for better performance in containers.

Reported by: PVS-Studio

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 02:38:53 +03:00
Vyacheslav Ivanov 818fd716cc fix: optimization: PVS-Studio warning V825
The 'current.reset(lang.release())' expression is equivalent to 'current = std::move(lang)'.
Changed 'current.reset(lang.release())' to 'current = std::move(lang)' to improve code clarity and performance.

Reported by: PVS-Studio

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-02 01:57:43 +03:00
Vyacheslav Ivanov 5dd7a15c09 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-02 01:57:43 +03:00
Vyacheslav Ivanov 73e721513c fix: optimization: PVS-Studio warning V836
Expression's value is copied at variable declaration.
The variable is never modified. Consider declaring it as a reference.

Changed variables to be a reference to avoid unnecessary copy.

Reported by: PVS-Studio

Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
2024-08-01 23:40:28 +03:00
MihailRis 50a388c539 fix: access to deleted Sensor 2024-08-01 17:10:30 +03:00
MihailRis f8907f7db1 add on_update, on_render to docs & change entities tps to 20 2024-08-01 16:04:27 +03:00
MihailRis 3f67944cc2 update CHANGELOG.md 2024-07-31 22:01:32 +03:00
MihailRis 7939547185 update README.md 2024-07-31 21:05:39 +03:00
MihailRis 94841b6641 update FUNDING.yml 2024-07-31 20:55:10 +03:00
MihailRis bd5bed6112 add CHANGELOG.md 2024-07-31 20:50:40 +03:00
MihailRisandGitHub ba26566d63 Merge pull request #274 from sekta2/main
modified math, string and table
2024-07-31 17:22:27 +03:00
sekta 4894d4cf42 1000 ms in 1 sec 2024-07-31 18:03:23 +04:00
sekta 509db9790d srakotan 2024-07-31 17:44:25 +04:00
sekta bee4421ce9 Merge branch 'main' of https://github.com/sekta2/VoxelEngine-Cpp 2024-07-31 17:42:28 +04:00
sekta 871f9a4880 removed trash 2024-07-31 17:32:20 +04:00
sekta f9c3ec66be modified math, table and string in one file 2024-07-31 17:30:39 +04:00
sekta 987d6b6d3f . 2024-07-31 17:14:17 +04:00
MihailandGitHub e05b9bff5d Update stdcmd.lua 2024-07-31 16:18:29 +04:00
MihailandGitHub 4502a1206e added some libraries 2024-07-31 16:12:49 +04:00
MihailandGitHub 3b8d2b2e8c Add files via upload 2024-07-31 16:11:50 +04:00
MihailRis eefaafd1e7 update block.compose_state, block.decompose_state semantics 2024-07-31 14:56:42 +03:00
MihailRis 3a1ae57bbf fix: mat4.decompose (-Wmaybe-uninitialized) 2024-07-31 14:45:09 +03:00
MihailRisandGitHub a0fdc5e963 Merge pull request #271 from sekta2/patch-2
a lot stuff changed
2024-07-31 14:36:03 +03:00
MihailandGitHub f4f8caec43 a lot stuff changed 2024-07-31 15:25:58 +04:00
MihailRisandGitHub 8e789affcb Merge pull request #270 from sekta2/patch-1
pcall(function, varargs)
2024-07-31 13:15:40 +03:00
MihailandGitHub e74f65eb70 pcall(function, varargs) 2024-07-31 13:37:46 +04:00
MihailRis 10fa828bd7 update component 'ARGS' variable default value 2024-07-30 19:52:04 +03:00
MihailRis a2f79e979e fix: framerate setting values not translated 2024-07-30 19:45:47 +03:00
MihailRis 63d0c8b01a fix: audio positioning when non-base camera active 2024-07-30 12:02:32 +03:00
MihailRis c50f564b80 fix: overlay 'on_close' not called on window close 2024-07-29 21:04:27 +03:00
MihailRis 8f26397e56 hide hotbar on overlays with inventory hidden 2024-07-29 20:36:49 +03:00
MihailRis a66228eb41 fix: 'gravity' does not work on hud overlays 2024-07-29 20:29:23 +03:00
MihailRis c947af904d increase debug-panel width 2024-07-29 17:03:51 +03:00
MihailRis 753fb6bf3b add vec2.angle(...) 2024-07-29 16:54:57 +03:00
MihailRis 2b7b68f3c2 add 'static' entity body-type 2024-07-29 15:45:28 +03:00
MihailRis d6696b54cb add 'normal' argument to on_use_on_block event 2024-07-29 15:23:04 +03:00
MihailRis 0f26d7c93a fix 2024-07-29 13:10:53 +03:00
MihailRisandGitHub d793b2f648 Merge pull request #269 from MihailRis/framerate-control
Framerate control
2024-07-29 00:14:14 +03:00
MihailRis b021339a8a add window icon 2024-07-28 23:47:49 +03:00
MihailRis c0ba5be458 add framerate control 2024-07-28 22:31:27 +03:00
MihailRis a2f011fc96 Merge branch 'main' into framerate-control 2024-07-28 22:20:25 +03:00
MihailRis 84f863f2d9 update doc/*/xml-ui-layouts.md 2024-07-28 22:19:54 +03:00
MihailRis f46e4a7989 add trackbar 'sub-consumer' for value label refresh when 'change-on-release' 2024-07-28 22:15:18 +03:00
MihailRis 0e3bd4dcac update english version on xml-ui-layouts.md 2024-07-28 12:57:58 +03:00
MihailRis 479046a268 update doc/*/xml-ui-layouts.md 2024-07-28 12:46:31 +03:00
MihailRis 8ca12127db add 'change-on-release' trackbar property & fix mouseRelease event timing 2024-07-28 12:38:31 +03:00
MihailRis 3fee1072b7 fix 'block' model lights with AO turned-off 2024-07-27 22:59:06 +03:00
MihailRis 71e20ff805 add block 'ambient-occlusion' property 2024-07-27 18:37:18 +03:00