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:
Vyacheslav Ivanov
2024-08-02 06:12:30 +03:00
committed by Pugemon
parent c4cc71623d
commit c3e4341a04
2 changed files with 5 additions and 5 deletions
+4 -4
View File
@@ -11,12 +11,12 @@
namespace fs = std::filesystem;
class ArgsReader {
int argc;
char** argv;
int pos = 0;
const char* last = "";
char** argv;
int argc;
int pos = 0;
public:
ArgsReader(int argc, char** argv) : argc(argc), argv(argv) {}
ArgsReader(int argc, char** argv) : argv(argv), argc(argc) {}
void skip() {
pos++;