commit abf67ab6344074273419005b503d90911897a86d Author: Daniel Swanson Date: Mon Jun 14 13:34:52 2021 -0500 move default values from constructor to header diff --git a/src/lsx_compiler.cc b/src/lsx_compiler.cc index 069c890..b13d0ca 100644 --- a/src/lsx_compiler.cc +++ b/src/lsx_compiler.cc @@ -33,18 +33,6 @@ UString const Compiler::COMPILER_ANYTAG_ELEM = "t"_u; UString const Compiler::COMPILER_ANYCHAR_ELEM = "w"_u; UString const Compiler::COMPILER_WB_ELEM = "j"_u; -Compiler::Compiler() : -reader(0), -verbose(false), -first_element(false), -any_tag(0), any_char(0), word_boundary(0) -{ -} - -Compiler::~Compiler() -{ -} - void Compiler::parse(string const &fichero, UString const &dir) { diff --git a/src/lsx_compiler.h b/src/lsx_compiler.h index 10a5aa2..3956f16 100644 --- a/src/lsx_compiler.h +++ b/src/lsx_compiler.h @@ -39,7 +39,7 @@ private: /** * The libxml2's XML reader */ - xmlTextReaderPtr reader; + xmlTextReaderPtr reader = nullptr; /** * The alt value @@ -85,12 +85,12 @@ private: /** * Set verbose mode: warnings which may or may not be correct */ - bool verbose; + bool verbose = false; /** * First element (of an entry) */ - bool first_element; + bool first_element = false; /** * Identifier of all the symbols during the compilation @@ -100,9 +100,9 @@ private: /** * Special symbols */ - int32_t any_tag; - int32_t any_char; - int32_t word_boundary; + int32_t any_tag = 0; + int32_t any_char = 0; + int32_t word_boundary = 0; /** * List of named transducers-paradigms @@ -308,16 +308,6 @@ public: static UString const COMPILER_WB_ELEM; - /** - * Constructor - */ - Compiler(); - - /** - * Destructor - */ - ~Compiler(); - /** * Compile dictionary to letter transducers * @param fichero file