diff --git a/Core/CLI/src/cli_Commands.h b/Core/CLI/src/cli_Commands.h index 6e2ca7a15c..4dd1b13c3d 100644 --- a/Core/CLI/src/cli_Commands.h +++ b/Core/CLI/src/cli_Commands.h @@ -14,7 +14,7 @@ namespace cli class AliasCommand : public cli::ParserCommand { public: - explicit AliasCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit AliasCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~AliasCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -84,7 +84,7 @@ namespace cli class CDCommand : public cli::ParserCommand { public: - explicit CDCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit CDCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~CDCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -119,7 +119,7 @@ namespace cli class DebugCommand : public cli::ParserCommand { public: - explicit DebugCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit DebugCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~DebugCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -151,7 +151,7 @@ namespace cli class DirsCommand : public cli::ParserCommand { public: - explicit DirsCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit DirsCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~DirsCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -176,7 +176,7 @@ namespace cli class EchoCommand : public cli::ParserCommand { public: - explicit EchoCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit EchoCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~EchoCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -236,7 +236,7 @@ namespace cli class EpMemCommand : public cli::ParserCommand { public: - explicit EpMemCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit EpMemCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~EpMemCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -420,7 +420,7 @@ namespace cli class GPCommand : public cli::ParserCommand { public: - explicit GPCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit GPCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~GPCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -455,7 +455,7 @@ namespace cli class HelpCommand : public cli::ParserCommand { public: - explicit HelpCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit HelpCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~HelpCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -481,7 +481,7 @@ namespace cli class LearnCommand : public cli::ParserCommand { public: - explicit LearnCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit LearnCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~LearnCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -583,7 +583,7 @@ namespace cli class LSCommand : public cli::ParserCommand { public: - explicit LSCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit LSCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~LSCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -613,7 +613,7 @@ namespace cli class PopDCommand : public cli::ParserCommand { public: - explicit PopDCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit PopDCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~PopDCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -643,7 +643,7 @@ namespace cli class PreferencesCommand : public cli::ParserCommand { public: - explicit PreferencesCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit PreferencesCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~PreferencesCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -741,7 +741,7 @@ namespace cli class PrintCommand : public cli::ParserCommand { public: - explicit PrintCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit PrintCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~PrintCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -917,7 +917,7 @@ namespace cli class PushDCommand : public cli::ParserCommand { public: - explicit PushDCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit PushDCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~PushDCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -951,7 +951,7 @@ namespace cli class PWDCommand : public cli::ParserCommand { public: - explicit PWDCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit PWDCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~PWDCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -981,7 +981,7 @@ namespace cli class RLCommand : public cli::ParserCommand { public: - explicit RLCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit RLCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~RLCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -1110,7 +1110,7 @@ namespace cli class RunCommand : public cli::ParserCommand { public: - explicit RunCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit RunCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~RunCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -1250,7 +1250,7 @@ namespace cli class SMemCommand : public cli::ParserCommand { public: - explicit SMemCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit SMemCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~SMemCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -1484,7 +1484,7 @@ namespace cli class SPCommand : public cli::ParserCommand { public: - explicit SPCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit SPCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~SPCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -1520,7 +1520,7 @@ namespace cli class StatsCommand : public cli::ParserCommand { public: - explicit StatsCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit StatsCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~StatsCommand() override = default; [[nodiscard]] const char* GetString() const override { @@ -1633,7 +1633,7 @@ namespace cli class SVSCommand : public cli::ParserCommand { public: - explicit SVSCommand(cli::CommandLineInterface& cli) : cli(cli), ParserCommand() {} + explicit SVSCommand(cli::CommandLineInterface& cli) : ParserCommand(), cli(cli) {} ~SVSCommand() override = default; [[nodiscard]] const char* GetString() const override { diff --git a/Core/SVS/src/cliproxy.h b/Core/SVS/src/cliproxy.h index 03495fd9e3..5d6a51803f 100644 --- a/Core/SVS/src/cliproxy.h +++ b/Core/SVS/src/cliproxy.h @@ -16,17 +16,17 @@ class cliproxy } cliproxy& set_help(const std::string& t); cliproxy& add_arg(const std::string& arg, const std::string& help); - + private: void list_children(int level, std::ostream& os); void print_help(std::ostream& os) const; - + virtual void proxy_get_children(std::map& c) {} virtual void proxy_use_sub(const std::vector& args, std::ostream& os) { list_children(0, os); } - + std::string help_text; std::vector args_help; }; @@ -40,7 +40,7 @@ class int_proxy : public cliproxy { return true; } - + private: int* p; }; @@ -54,7 +54,7 @@ class float_proxy : public cliproxy { return true; } - + private: double* p; }; @@ -68,7 +68,7 @@ class bool_proxy : public cliproxy { return true; } - + private: bool* p; }; @@ -81,12 +81,12 @@ class memfunc_proxy : public cliproxy typedef void (T::*fout_ptr)(std::ostream& os); typedef void (T::*fargc_ptr)(const std::vector& args, std::ostream& os) const; typedef void (T::*foutc_ptr)(std::ostream& os) const; - - memfunc_proxy(T* p, farg_ptr f) : p(p), pc(NULL), farg(f), fargc(NULL), fout(NULL), foutc(NULL) {} - memfunc_proxy(T* p, fout_ptr f) : p(p), pc(NULL), farg(NULL), fargc(NULL), fout(f), foutc(NULL) {} - memfunc_proxy(const T* p, fargc_ptr f) : p(NULL), pc(p), farg(NULL), fargc(f), fout(NULL), foutc(NULL) {} - memfunc_proxy(const T* p, foutc_ptr f) : p(NULL), pc(p), farg(NULL), fargc(NULL), fout(NULL), foutc(f) {} - + + memfunc_proxy(T* p, farg_ptr f) : p(p), pc(NULL), farg(f), fout(NULL), fargc(NULL), foutc(NULL) {} + memfunc_proxy(T* p, fout_ptr f) : p(p), pc(NULL), farg(NULL), fargc(NULL), fout(f), foutc(NULL) {} + memfunc_proxy(const T* p, fargc_ptr f) : p(NULL), pc(p), farg(NULL), fargc(f), fout(NULL), foutc(NULL) {} + memfunc_proxy(const T* p, foutc_ptr f) : p(NULL), pc(p), farg(NULL), fout(NULL), fargc(NULL), foutc(f) {} + void proxy_use_sub(const std::vector& args, std::ostream& os) { if (farg) @@ -106,12 +106,12 @@ class memfunc_proxy : public cliproxy (pc->*foutc)(os); } } - + bool temporary() const { return true; } - + private: T* p; const T* pc; @@ -130,10 +130,10 @@ class proxy_group : public cliproxy { return true; } - + private: void proxy_get_children(std::map& c); - + std::map children; }; diff --git a/Core/SoarKernel/src/shared/mempool_allocator.h b/Core/SoarKernel/src/shared/mempool_allocator.h index 78e3b666e9..200e987521 100644 --- a/Core/SoarKernel/src/shared/mempool_allocator.h +++ b/Core/SoarKernel/src/shared/mempool_allocator.h @@ -52,13 +52,13 @@ namespace soar_module typedef const T& const_reference; public: - soar_memory_pool_allocator() : mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator() : memory_manager(NULL), mem_pool(NULL) { memory_manager = &(Memory_Manager::Get_MPM()); mem_pool = memory_manager->get_memory_pool(sizeof(value_type)); } - soar_memory_pool_allocator(agent* new_agent): mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator(agent* new_agent): memory_manager(NULL), mem_pool(NULL) { // useful for debugging // std::string temp_this( typeid( value_type ).name() ); @@ -66,7 +66,7 @@ namespace soar_module mem_pool = memory_manager->get_memory_pool(sizeof(value_type)); } - soar_memory_pool_allocator(const soar_memory_pool_allocator& obj): mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator(const soar_memory_pool_allocator& obj): memory_manager(NULL), mem_pool(NULL) { // useful for debugging // std::string temp_this( typeid( value_type ).name() ); @@ -75,7 +75,7 @@ namespace soar_module } template - soar_memory_pool_allocator(const soar_memory_pool_allocator<_other>& other): mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator(const soar_memory_pool_allocator<_other>& other): memory_manager(NULL), mem_pool(NULL) { // useful for debugging // std::string temp_this( typeid( T ).name() ); @@ -159,13 +159,13 @@ namespace soar_module typedef const T& const_reference; public: - soar_memory_pool_allocator_n() : mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator_n() : memory_manager(NULL), mem_pool(NULL) { memory_manager = &(Memory_Manager::Get_MPM()); mem_pool = memory_manager->get_memory_pool(sizeof(value_type)); } - soar_memory_pool_allocator_n(agent* new_agent): mem_pool(NULL), memory_manager(NULL) + soar_memory_pool_allocator_n(agent* new_agent): memory_manager(NULL), mem_pool(NULL) { // useful for debugging // std::string temp_this( typeid( value_type ).name() ); diff --git a/Core/SoarKernel/src/soar_representation/rhs_functions_math.cpp b/Core/SoarKernel/src/soar_representation/rhs_functions_math.cpp index 126bc9c3d0..91548115e4 100644 --- a/Core/SoarKernel/src/soar_representation/rhs_functions_math.cpp +++ b/Core/SoarKernel/src/soar_representation/rhs_functions_math.cpp @@ -1846,7 +1846,7 @@ struct wme_val_stats { double mean; double sum_square; - wme_val_stats(): count(0), sum(0.0), product(1.0), mean(0.0), sum_square(0.0), min(DBL_MAX), max(-DBL_MAX) { } + wme_val_stats(): count(0), sum(0.0), product(1.0), min(DBL_MAX), max(-DBL_MAX), mean(0.0), sum_square(0.0) { } }; /* diff --git a/Core/shared/misc.h b/Core/shared/misc.h index 98cc6d7d62..52ef8a68c4 100644 --- a/Core/shared/misc.h +++ b/Core/shared/misc.h @@ -231,7 +231,7 @@ class soar_timer { public: soar_timer() - : enabled_ptr(NULL), t1(0), elapsed(0) + : t1(0), elapsed(0), enabled_ptr(NULL) { raw_per_usec = get_raw_time_per_usec(); }