mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-11 22:11:51 +00:00
fix: optimization: PVS-Studio warning V802
Rearranged structure fields in decreasing order of size to reduce structure size from 32 to 24 and 12 to 8 bytes on 64-bit platforms. Reported by: PVS-Studio Signed-off-by: Vyacheslav Ivanov <islavaivanov76@gmail.com>
This commit is contained in:
parent
78e274dec4
commit
52905ff27b
2 changed files with 5 additions and 5 deletions
|
|
@ -38,8 +38,8 @@ struct ItemDef {
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
itemid_t id;
|
itemid_t id;
|
||||||
item_funcs_set funcsset {};
|
|
||||||
blockid_t placingBlock;
|
blockid_t placingBlock;
|
||||||
|
item_funcs_set funcsset {};
|
||||||
bool emissive = false;
|
bool emissive = false;
|
||||||
} rt {};
|
} rt {};
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -11,12 +11,12 @@
|
||||||
namespace fs = std::filesystem;
|
namespace fs = std::filesystem;
|
||||||
|
|
||||||
class ArgsReader {
|
class ArgsReader {
|
||||||
int argc;
|
|
||||||
char** argv;
|
|
||||||
int pos = 0;
|
|
||||||
const char* last = "";
|
const char* last = "";
|
||||||
|
char** argv;
|
||||||
|
int argc;
|
||||||
|
int pos = 0;
|
||||||
public:
|
public:
|
||||||
ArgsReader(int argc, char** argv) : argc(argc), argv(argv) {}
|
ArgsReader(int argc, char** argv) : argv(argv), argc(argc) {}
|
||||||
|
|
||||||
void skip() {
|
void skip() {
|
||||||
pos++;
|
pos++;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue