From 360b3451dc64896b92406e92ecf614cc6ff1521c Mon Sep 17 00:00:00 2001 From: vil02 <65706193+vil02@users.noreply.github.com> Date: Tue, 27 May 2025 17:03:40 +0200 Subject: [PATCH] style: resolve `-Wreorder` --- ciphers/uint256_t.hpp | 2 +- data_structures/stack_using_array.cpp | 2 +- data_structures/tree_234.cpp | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/ciphers/uint256_t.hpp b/ciphers/uint256_t.hpp index a776d4cb0e..aef52f10e2 100644 --- a/ciphers/uint256_t.hpp +++ b/ciphers/uint256_t.hpp @@ -72,7 +72,7 @@ class uint256_t { */ template ::value, T>::type> - explicit uint256_t(T low) : s(low), f(0) {} + explicit uint256_t(T low) : f(0), s(low) {} /** * @brief Parameterized constructor diff --git a/data_structures/stack_using_array.cpp b/data_structures/stack_using_array.cpp index 73feaf445c..ab67a9172a 100644 --- a/data_structures/stack_using_array.cpp +++ b/data_structures/stack_using_array.cpp @@ -25,7 +25,7 @@ class Stack { * * @param size Maximum size of the stack */ - Stack(int size) : stackSize(size), stackIndex(-1), stack(new T[size]) {} + Stack(int size) : stack(new T[size]), stackSize(size), stackIndex(-1) {} /** * @brief Checks if the stack is full diff --git a/data_structures/tree_234.cpp b/data_structures/tree_234.cpp index 46de03bfae..57b48e8c94 100644 --- a/data_structures/tree_234.cpp +++ b/data_structures/tree_234.cpp @@ -39,9 +39,9 @@ class Node { * @param item the first value we insert to the node */ explicit Node(int64_t item) - : count(1), - items({{item, 0, 0}}), - children({{nullptr, nullptr, nullptr, nullptr}}) {} + : items({{item, 0, 0}}), + children({{nullptr, nullptr, nullptr, nullptr}}), + count(1) {} /** * @brief Get the item count that current saved in the node