diff options
Diffstat (limited to 'TAO/TAO_IDL/util/utl_global.cpp')
-rw-r--r-- | TAO/TAO_IDL/util/utl_global.cpp | 318 |
1 files changed, 159 insertions, 159 deletions
diff --git a/TAO/TAO_IDL/util/utl_global.cpp b/TAO/TAO_IDL/util/utl_global.cpp index 63e2931a6e3..1c9a20bd53b 100644 --- a/TAO/TAO_IDL/util/utl_global.cpp +++ b/TAO/TAO_IDL/util/utl_global.cpp @@ -91,7 +91,7 @@ trademarks or registered trademarks of Sun Microsystems, Inc. #undef INCREMENT #define INCREMENT 64 -static long *pSeenOnce = 0; +static long *pSeenOnce = nullptr; #if defined (ACE_OPENVMS) #include <unixlib.h> @@ -110,7 +110,7 @@ char* IDL_GlobalData::translateName(const char* name, char *name_buf) } #endif -IDL_GlobalData::IDL_GlobalData (void) +IDL_GlobalData::IDL_GlobalData () : syntax_only_ (false), parse_args_exit_ (false), parse_args_exit_status_ (0), @@ -122,35 +122,35 @@ IDL_GlobalData::IDL_GlobalData (void) ignore_files_ (false), ignore_lookup_errors_ (false), unknown_annotations_ (UNKNOWN_ANNOTATIONS_WARN_ONCE), - pd_root (0), - pd_gen (0), - pd_primary_key_base (0), - pd_err (0), + pd_root (nullptr), + pd_gen (nullptr), + pd_primary_key_base (nullptr), + pd_err (nullptr), pd_err_count (0), pd_lineno (0), - pd_filename (0), - pd_main_filename (0), - pd_real_filename (0), - pd_stripped_filename (0), + pd_filename (nullptr), + pd_main_filename (nullptr), + pd_real_filename (nullptr), + pd_stripped_filename (nullptr), pd_import (false), pd_in_main_file (false), - pd_prog_name (0), - pd_cpp_location (0), + pd_prog_name (nullptr), + pd_cpp_location (nullptr), pd_compile_flags (0), - pd_local_escapes (0), - pd_indent (0), - pd_include_file_names (0), + pd_local_escapes (nullptr), + pd_indent (nullptr), + pd_include_file_names (nullptr), pd_n_include_file_names (0), pd_n_alloced_file_names (0), - included_idl_files_ (0), + included_idl_files_ (nullptr), n_included_idl_files_ (0), n_allocated_idl_files_ (0), pd_parse_state (PS_NoState), - pd_idl_src_file (0), - tao_root_ (0), - gperf_path_ (0), - temp_dir_ (0), - ident_string_ (0), + pd_idl_src_file (nullptr), + tao_root_ (nullptr), + gperf_path_ (nullptr), + temp_dir_ (nullptr), + ident_string_ (nullptr), case_diff_error_ (true), nest_orb_ (false), idl_flags_ (""), @@ -160,14 +160,14 @@ IDL_GlobalData::IDL_GlobalData (void) ignore_idl3_ (false), dcps_support_zero_copy_read_ (false), dcps_gen_zero_copy_read_ (false), - recursion_start_ (0), + recursion_start_ (nullptr), multi_file_input_ (false), big_file_name_ ("PICML_IDL_file_bag"), - current_params_ (0), - alias_params_ (0), - for_new_holder_ (0), + current_params_ (nullptr), + alias_params_ (nullptr), + for_new_holder_ (nullptr), included_ami_receps_done_ (false), - corba_module_ (0), + corba_module_ (nullptr), anon_type_diagnostic_ (ANON_TYPE_ERROR), explicit_anon_type_diagnostic_ (false), in_typedef_ (false), @@ -181,7 +181,7 @@ IDL_GlobalData::IDL_GlobalData (void) // Form the absolute pathname. char* ace_root = ACE_OS::getenv ("ACE_ROOT"); - if (ace_root == 0) + if (ace_root == nullptr) // This may not cause any problem if -g option is used to specify // the correct path for the gperf program. Let us ignore this // error here. It will be caught when we check the existence of @@ -198,7 +198,7 @@ IDL_GlobalData::IDL_GlobalData (void) "%s", ace_gperf); #else - this->gperf_path_ = 0; + this->gperf_path_ = nullptr; #endif } else @@ -241,13 +241,13 @@ IDL_GlobalData::IDL_GlobalData (void) this->reset_flag_seen (); } -IDL_GlobalData::~IDL_GlobalData (void) +IDL_GlobalData::~IDL_GlobalData () { } // When starting to process the next command line input idl file, reset. void -IDL_GlobalData::reset_flag_seen (void) +IDL_GlobalData::reset_flag_seen () { abstract_iface_seen_ = false; abstractbase_seen_ = false; @@ -314,14 +314,14 @@ IDL_GlobalData::reset_flag_seen (void) // Get or set scopes stack UTL_ScopeStack & -IDL_GlobalData::scopes (void) +IDL_GlobalData::scopes () { return this->pd_scopes; } // Get or set root of AST AST_Root * -IDL_GlobalData::root (void) +IDL_GlobalData::root () { return this->pd_root; } @@ -334,7 +334,7 @@ IDL_GlobalData::set_root (AST_Root *r) // Get or set generator object AST_Generator * -IDL_GlobalData::gen (void) +IDL_GlobalData::gen () { return this->pd_gen; } @@ -347,7 +347,7 @@ IDL_GlobalData::set_gen (AST_Generator *g) // Get or set PrimaryKeyBase object AST_ValueType * -IDL_GlobalData::primary_key_base (void) +IDL_GlobalData::primary_key_base () { return this->pd_primary_key_base; } @@ -360,7 +360,7 @@ IDL_GlobalData::primary_key_base (AST_ValueType *v) // Get or set error object UTL_Error * -IDL_GlobalData::err (void) +IDL_GlobalData::err () { return this->pd_err; } @@ -373,7 +373,7 @@ IDL_GlobalData::set_err (UTL_Error *e) // Get or set error count int -IDL_GlobalData::err_count (void) +IDL_GlobalData::err_count () { return this->pd_err_count; } @@ -386,7 +386,7 @@ IDL_GlobalData::set_err_count (int c) // Get or set line number long -IDL_GlobalData::lineno (void) +IDL_GlobalData::lineno () { return this->pd_lineno; } @@ -399,7 +399,7 @@ IDL_GlobalData::set_lineno (long n) // Get or set file name being read now UTL_String * -IDL_GlobalData::filename (void) +IDL_GlobalData::filename () { return this->pd_filename; } @@ -407,11 +407,11 @@ IDL_GlobalData::filename (void) void IDL_GlobalData::set_filename (UTL_String *s) { - if (this->pd_filename != 0) + if (this->pd_filename != nullptr) { this->pd_filename->destroy (); delete this->pd_filename; - this->pd_filename = 0; + this->pd_filename = nullptr; } this->pd_filename = s; @@ -419,7 +419,7 @@ IDL_GlobalData::set_filename (UTL_String *s) // Get or set main file name UTL_String * -IDL_GlobalData::main_filename (void) +IDL_GlobalData::main_filename () { return this->pd_main_filename; } @@ -427,18 +427,18 @@ IDL_GlobalData::main_filename (void) void IDL_GlobalData::set_main_filename (UTL_String *n) { - if (this->pd_main_filename != 0) + if (this->pd_main_filename != nullptr) { this->pd_main_filename->destroy (); delete this->pd_main_filename; - this->pd_main_filename = 0; + this->pd_main_filename = nullptr; } this->pd_main_filename = n; } // Get or set real file name UTL_String * -IDL_GlobalData::real_filename (void) +IDL_GlobalData::real_filename () { return this->pd_real_filename; } @@ -446,11 +446,11 @@ IDL_GlobalData::real_filename (void) void IDL_GlobalData::set_real_filename (UTL_String *n) { - if (this->pd_real_filename != 0) + if (this->pd_real_filename != nullptr) { this->pd_real_filename->destroy (); delete this->pd_real_filename; - this->pd_real_filename = 0; + this->pd_real_filename = nullptr; } this->pd_real_filename = n; @@ -458,13 +458,13 @@ IDL_GlobalData::set_real_filename (UTL_String *n) // Get or set indicator whether import is on bool -IDL_GlobalData::imported (void) +IDL_GlobalData::imported () { return this->pd_in_main_file ? false : pd_import; } bool -IDL_GlobalData::import (void) +IDL_GlobalData::import () { return this->pd_import; } @@ -477,7 +477,7 @@ IDL_GlobalData::set_import (bool is_in) // Get or set indicator whether we're reading the main file now bool -IDL_GlobalData::in_main_file (void) +IDL_GlobalData::in_main_file () { return this->pd_in_main_file; } @@ -490,7 +490,7 @@ IDL_GlobalData::set_in_main_file (bool is_in) // Get or set stripped file name UTL_String * -IDL_GlobalData::stripped_filename (void) +IDL_GlobalData::stripped_filename () { return this->pd_stripped_filename; } @@ -498,7 +498,7 @@ IDL_GlobalData::stripped_filename (void) void IDL_GlobalData::set_stripped_filename (UTL_String *nm) { - if (this->pd_stripped_filename != 0) + if (this->pd_stripped_filename != nullptr) { delete this->pd_stripped_filename; } @@ -508,7 +508,7 @@ IDL_GlobalData::set_stripped_filename (UTL_String *nm) // Get or set cache value for argv[0] const char * -IDL_GlobalData::prog_name (void) +IDL_GlobalData::prog_name () { return this->pd_prog_name; } @@ -521,7 +521,7 @@ IDL_GlobalData::set_prog_name (const char *pn) // Get or set location to find C preprocessor const char * -IDL_GlobalData::cpp_location (void) +IDL_GlobalData::cpp_location () { return this->pd_cpp_location; } @@ -534,7 +534,7 @@ IDL_GlobalData::set_cpp_location (const char *l) // Get or set IDL compiler flags long -IDL_GlobalData::compile_flags (void) +IDL_GlobalData::compile_flags () { return this->pd_compile_flags; } @@ -556,7 +556,7 @@ IDL_GlobalData::set_compile_flags (long cf) // Get or set local escapes string. This provides an additional // mechanism to pass information to a BE. char * -IDL_GlobalData::local_escapes (void) +IDL_GlobalData::local_escapes () { return this->pd_local_escapes; } @@ -564,7 +564,7 @@ IDL_GlobalData::local_escapes (void) void IDL_GlobalData::set_local_escapes (const char *e) { - if (this->pd_local_escapes != 0) + if (this->pd_local_escapes != nullptr) { delete [] this->pd_local_escapes; } @@ -574,7 +574,7 @@ IDL_GlobalData::set_local_escapes (const char *e) // Get or set indent object UTL_Indenter * -IDL_GlobalData::indent (void) +IDL_GlobalData::indent () { return this->pd_indent; } @@ -590,7 +590,7 @@ long IDL_GlobalData::seen_include_file_before (char *n) { unsigned long i; - char *incl = 0; + char *incl = nullptr; char *tmp = n; for (i = 0; i < this->pd_n_include_file_names; ++i) @@ -665,7 +665,7 @@ IDL_GlobalData::set_include_file_names (UTL_String **ns) } UTL_String ** -IDL_GlobalData::include_file_names (void) +IDL_GlobalData::include_file_names () { return this->pd_include_file_names; } @@ -677,7 +677,7 @@ IDL_GlobalData::set_n_include_file_names (unsigned long n) } unsigned long -IDL_GlobalData::n_include_file_names (void) +IDL_GlobalData::n_include_file_names () { return pd_n_include_file_names; } @@ -735,13 +735,13 @@ IDL_GlobalData::add_to_included_idl_files (const char *file_name) } char** -IDL_GlobalData::included_idl_files (void) +IDL_GlobalData::included_idl_files () { return this->included_idl_files_; } size_t -IDL_GlobalData::n_included_idl_files (void) +IDL_GlobalData::n_included_idl_files () { return this->n_included_idl_files_; } @@ -762,13 +762,13 @@ IDL_GlobalData::set_parse_state(ParseState ps) } IDL_GlobalData::ParseState -IDL_GlobalData::parse_state (void) +IDL_GlobalData::parse_state () { return pd_parse_state; } // returns the IDL source file being copiled -UTL_String* IDL_GlobalData::idl_src_file (void) +UTL_String* IDL_GlobalData::idl_src_file () { return this->pd_idl_src_file; } @@ -784,7 +784,7 @@ IDL_GlobalData::temp_dir (const char *s) { // Delete the old pointer. delete [] this->temp_dir_; - this->temp_dir_ = 0; // In case the ACE_NEW fails below. + this->temp_dir_ = nullptr; // In case the ACE_NEW fails below. const size_t lengthSep = sizeof (ACE_DIRECTORY_SEPARATOR_STR_A) - 1u; const size_t lengthPath = ACE_OS::strlen (s); @@ -810,7 +810,7 @@ IDL_GlobalData::temp_dir (const char *s) } const char * -IDL_GlobalData::temp_dir (void) const +IDL_GlobalData::temp_dir () const { return this->temp_dir_; } @@ -823,7 +823,7 @@ IDL_GlobalData::tao_root (const char *s) } const char * -IDL_GlobalData::tao_root (void) const +IDL_GlobalData::tao_root () const { return this->tao_root_; } @@ -836,7 +836,7 @@ IDL_GlobalData::gperf_path (const char *s) } const char * -IDL_GlobalData::gperf_path (void) const +IDL_GlobalData::gperf_path () const { return this->gperf_path_; } @@ -849,7 +849,7 @@ IDL_GlobalData::ident_string (const char *s) } const char * -IDL_GlobalData::ident_string (void) const +IDL_GlobalData::ident_string () const { return this->ident_string_; } @@ -861,7 +861,7 @@ IDL_GlobalData::case_diff_error (bool val) } bool -IDL_GlobalData::case_diff_error (void) +IDL_GlobalData::case_diff_error () { return this->case_diff_error_; } @@ -873,57 +873,57 @@ IDL_GlobalData::nest_orb (bool val) } bool -IDL_GlobalData::nest_orb (void) +IDL_GlobalData::nest_orb () { return this->nest_orb_; } void -IDL_GlobalData::destroy (void) +IDL_GlobalData::destroy () { - if (this->pd_filename != 0) + if (this->pd_filename != nullptr) { this->pd_filename->destroy (); delete this->pd_filename; - this->pd_filename = 0; + this->pd_filename = nullptr; } - if (this->pd_main_filename != 0) + if (this->pd_main_filename != nullptr) { this->pd_main_filename->destroy (); delete this->pd_main_filename; - this->pd_main_filename = 0; + this->pd_main_filename = nullptr; } - if (this->pd_real_filename != 0) + if (this->pd_real_filename != nullptr) { this->pd_real_filename->destroy (); delete this->pd_real_filename; - this->pd_real_filename = 0; + this->pd_real_filename = nullptr; } - if (this->pd_stripped_filename != 0) + if (this->pd_stripped_filename != nullptr) { this->pd_stripped_filename->destroy (); delete this->pd_stripped_filename; - this->pd_stripped_filename = 0; + this->pd_stripped_filename = nullptr; } - if (this->pd_idl_src_file != 0) + if (this->pd_idl_src_file != nullptr) { this->pd_idl_src_file->destroy (); delete this->pd_idl_src_file; - this->pd_idl_src_file = 0; + this->pd_idl_src_file = nullptr; } size_t size = this->pragma_prefixes ().size (); - char *trash = 0; + char *trash = nullptr; for (size_t i = 0; i < size; ++i) { this->pragma_prefixes ().pop (trash); delete [] trash; - trash = 0; + trash = nullptr; } // Clean up each included file name - the array allocation itself @@ -932,7 +932,7 @@ IDL_GlobalData::destroy (void) { this->pd_include_file_names[j]->destroy (); delete this->pd_include_file_names[j]; - this->pd_include_file_names[j] = 0; + this->pd_include_file_names[j] = nullptr; } this->pd_n_include_file_names = 0; @@ -940,26 +940,26 @@ IDL_GlobalData::destroy (void) for (size_t k = 0; k < n_included_idl_files_; ++k) { ACE::strdelete (this->included_idl_files_[k]); - this->included_idl_files_[k] = 0; + this->included_idl_files_[k] = nullptr; } this->n_included_idl_files_ = 0; this->n_allocated_idl_files_ = 0; delete [] this->included_idl_files_; - this->included_idl_files_ = 0; + this->included_idl_files_ = nullptr; ACE::strdelete (this->recursion_start_); - this->recursion_start_ = 0; + this->recursion_start_ = nullptr; // Reset the member of the CORBA module containing the basic types // to point to itself, since all the other CORBA modules (if any) // will be destroyed. - if (this->corba_module_ != 0) + if (this->corba_module_ != nullptr) { this->corba_module_->reset_last_in_same_parent_scope (); } - if (0 != this->pd_root) + if (nullptr != this->pd_root) { this->pd_root->destroy (); } @@ -972,19 +972,19 @@ IDL_GlobalData::append_idl_flag (const char *s) } const char * -IDL_GlobalData::idl_flags (void) const +IDL_GlobalData::idl_flags () const { return this->idl_flags_.c_str (); } ACE_Hash_Map_Manager<ACE_CString, int, ACE_Null_Mutex> & -IDL_GlobalData::idl_keywords (void) +IDL_GlobalData::idl_keywords () { return this->idl_keywords_; } ACE_Unbounded_Stack<char *> & -IDL_GlobalData::pragma_prefixes (void) +IDL_GlobalData::pragma_prefixes () { return this->pragma_prefixes_; } @@ -994,7 +994,7 @@ IDL_GlobalData::update_prefix (char *filename) { // If we are just starting up and processing the temporary filename, // there are no prefix issues to deal with yet. - if (this->pd_main_filename == 0 || this->pd_filename == 0) + if (this->pd_main_filename == nullptr || this->pd_filename == nullptr) { return; } @@ -1012,10 +1012,10 @@ IDL_GlobalData::update_prefix (char *filename) return; } - ACE_CString tmp ("", 0, false); + ACE_CString tmp ("", nullptr, false); char *main_filename = this->pd_main_filename->get_string (); - char *prefix = 0; + char *prefix = nullptr; int status = this->file_prefixes_.find (filename, prefix); if (status == 0) @@ -1055,7 +1055,7 @@ IDL_GlobalData::update_prefix (char *filename) // pop it. if (status == 0 && ACE_OS::strcmp (prefix, "") != 0) { - char *trash = 0; + char *trash = nullptr; this->pragma_prefixes_.pop (trash); delete [] trash; } @@ -1073,7 +1073,7 @@ IDL_GlobalData::update_prefix (char *filename) Should be true when being used by the IFR Service */ bool -IDL_GlobalData::preserve_cpp_keywords (void) +IDL_GlobalData::preserve_cpp_keywords () { return preserve_cpp_keywords_; } @@ -1103,7 +1103,7 @@ IDL_GlobalData::add_rel_include_path (const char *s) } ACE_Unbounded_Queue<char *> const & -IDL_GlobalData::rel_include_paths (void) const +IDL_GlobalData::rel_include_paths () const { return this->rel_include_paths_; } @@ -1115,7 +1115,7 @@ IDL_GlobalData::add_ciao_lem_file_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_lem_file_names (void) +IDL_GlobalData::ciao_lem_file_names () { return this->ciao_lem_file_names_; } @@ -1127,7 +1127,7 @@ IDL_GlobalData::add_ciao_rti_ts_file_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_rti_ts_file_names (void) +IDL_GlobalData::ciao_rti_ts_file_names () { return this->ciao_rti_ts_file_names_; } @@ -1139,7 +1139,7 @@ IDL_GlobalData::add_ciao_spl_ts_file_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_spl_ts_file_names (void) +IDL_GlobalData::ciao_spl_ts_file_names () { return this->ciao_spl_ts_file_names_; } @@ -1151,7 +1151,7 @@ IDL_GlobalData::add_ciao_oci_ts_file_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_oci_ts_file_names (void) +IDL_GlobalData::ciao_oci_ts_file_names () { return this->ciao_oci_ts_file_names_; } @@ -1163,7 +1163,7 @@ IDL_GlobalData::add_ciao_coredx_ts_file_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_coredx_ts_file_names (void) +IDL_GlobalData::ciao_coredx_ts_file_names () { return this->ciao_coredx_ts_file_names_; } @@ -1175,7 +1175,7 @@ IDL_GlobalData::add_ciao_ami_iface_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_ami_iface_names (void) +IDL_GlobalData::ciao_ami_iface_names () { return this->ciao_ami_iface_names_; } @@ -1187,7 +1187,7 @@ IDL_GlobalData::add_ciao_ami_recep_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_ami_recep_names (void) +IDL_GlobalData::ciao_ami_recep_names () { return this->ciao_ami_recep_names_; } @@ -1199,13 +1199,13 @@ IDL_GlobalData::add_included_ami_recep_names (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::included_ami_recep_names (void) +IDL_GlobalData::included_ami_recep_names () { return this->included_ami_recep_names_; } bool -IDL_GlobalData::included_ami_receps_done (void) const +IDL_GlobalData::included_ami_receps_done () const { return this->included_ami_receps_done_; } @@ -1223,7 +1223,7 @@ IDL_GlobalData::add_ciao_ami_idl_fnames (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::ciao_ami_idl_fnames (void) +IDL_GlobalData::ciao_ami_idl_fnames () { return this->ciao_ami_idl_fnames_; } @@ -1235,25 +1235,25 @@ IDL_GlobalData::add_dds4ccm_impl_fnames (const char *s) } ACE_Unbounded_Queue<char *> & -IDL_GlobalData::dds4ccm_impl_fnames (void) +IDL_GlobalData::dds4ccm_impl_fnames () { return this->dds4ccm_impl_fnames_; } ACE_Unbounded_Queue<AST_Interface *> & -IDL_GlobalData::mixed_parentage_interfaces (void) +IDL_GlobalData::mixed_parentage_interfaces () { return this->mixed_parentage_interfaces_; } ACE_Hash_Map_Manager<char *, char *, ACE_Null_Mutex> & -IDL_GlobalData::file_prefixes (void) +IDL_GlobalData::file_prefixes () { return this->file_prefixes_; } bool -IDL_GlobalData::pass_orb_idl (void) const +IDL_GlobalData::pass_orb_idl () const { return this->pass_orb_idl_; } @@ -1265,7 +1265,7 @@ IDL_GlobalData::pass_orb_idl (bool val) } bool -IDL_GlobalData::using_ifr_backend (void) const +IDL_GlobalData::using_ifr_backend () const { return this->using_ifr_backend_; } @@ -1277,7 +1277,7 @@ IDL_GlobalData::using_ifr_backend (bool val) } bool -IDL_GlobalData::ignore_idl3 (void) const +IDL_GlobalData::ignore_idl3 () const { return this->ignore_idl3_; } @@ -1289,7 +1289,7 @@ IDL_GlobalData::ignore_idl3 (bool val) } bool -IDL_GlobalData::dcps_support_zero_copy_read (void) const +IDL_GlobalData::dcps_support_zero_copy_read () const { return this->dcps_support_zero_copy_read_; } @@ -1301,7 +1301,7 @@ IDL_GlobalData::dcps_support_zero_copy_read (bool val) } bool -IDL_GlobalData::dcps_gen_zero_copy_read (void) const +IDL_GlobalData::dcps_gen_zero_copy_read () const { return this->dcps_gen_zero_copy_read_; } @@ -1315,11 +1315,11 @@ IDL_GlobalData::dcps_gen_zero_copy_read (bool val) // Return 0 on success, -1 failure. The <errno> corresponding to the // error that caused the GPERF execution is also set. int -IDL_GlobalData::check_gperf (void) +IDL_GlobalData::check_gperf () { // If absolute path is not specified yet, let us call just // "gperf". Hopefully PATH is set up correctly to locate the gperf. - if (this->gperf_path_ == 0) + if (this->gperf_path_ == nullptr) { // If ACE_GPERF is defined then use that gperf program instead of "gperf." #if defined (ACE_GPERF) @@ -1420,35 +1420,35 @@ IDL_GlobalData::check_gperf (void) } void -IDL_GlobalData::fini (void) +IDL_GlobalData::fini () { - if (0 != this->pd_root) + if (nullptr != this->pd_root) { this->pd_root->fini (); delete this->pd_root; - this->pd_root = 0; + this->pd_root = nullptr; } delete this->pd_err; - this->pd_err = 0; + this->pd_err = nullptr; delete this->pd_gen; - this->pd_gen = 0; + this->pd_gen = nullptr; delete this->pd_indent; - this->pd_indent = 0; + this->pd_indent = nullptr; delete [] this->pd_local_escapes; - this->pd_local_escapes = 0; + this->pd_local_escapes = nullptr; delete [] this->tao_root_; - this->tao_root_ = 0; + this->tao_root_ = nullptr; delete [] this->gperf_path_; - this->gperf_path_ = 0; + this->gperf_path_ = nullptr; delete [] this->temp_dir_; - this->temp_dir_ = 0; + this->temp_dir_ = nullptr; delete [] this->ident_string_; - this->ident_string_ = 0; + this->ident_string_ = nullptr; delete [] this->pd_include_file_names; - this->pd_include_file_names = 0; + this->pd_include_file_names = nullptr; - Include_Path_Info *path_info = 0; + Include_Path_Info *path_info = nullptr; for (Unbounded_Paths_Queue_Iterator qiter (this->include_paths_); qiter.done () == 0; @@ -1458,7 +1458,7 @@ IDL_GlobalData::fini (void) ACE::strdelete (path_info->path_); } - char **path_tmp = 0; + char **path_tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( this->rel_include_paths_ @@ -1561,7 +1561,7 @@ IDL_GlobalData::fini (void) } - ACE_Hash_Map_Entry<char *, char *> *entry = 0; + ACE_Hash_Map_Entry<char *, char *> *entry = nullptr; for (ACE_Hash_Map_Iterator<char *, char *, ACE_Null_Mutex> hiter ( this->file_prefixes_ @@ -1574,7 +1574,7 @@ IDL_GlobalData::fini (void) ACE::strdelete (entry->int_id_); } - DCPS_Type_Info_Map::ENTRY *dcps_entry = 0; + DCPS_Type_Info_Map::ENTRY *dcps_entry = nullptr; for (DCPS_Type_Info_Map::ITERATOR dcps_iter ( this->dcps_type_info_map_); @@ -1585,7 +1585,7 @@ IDL_GlobalData::fini (void) dcps_entry->int_id_->name_->destroy (); delete dcps_entry->int_id_->name_; - dcps_entry->int_id_->name_ = 0; + dcps_entry->int_id_->name_ = nullptr; delete dcps_entry->int_id_; dcps_entry->int_id_ = 0; @@ -1596,15 +1596,15 @@ IDL_GlobalData::fini (void) } ACE_Unbounded_Queue<AST_ValueType *> & -IDL_GlobalData::primary_keys (void) +IDL_GlobalData::primary_keys () { return this->primary_keys_; } void -IDL_GlobalData::check_primary_keys (void) +IDL_GlobalData::check_primary_keys () { - AST_ValueType *holder = 0; + AST_ValueType *holder = nullptr; while (!this->primary_keys_.is_empty ()) { @@ -1625,7 +1625,7 @@ IDL_GlobalData::check_primary_keys (void) } const char * -IDL_GlobalData::recursion_start (void) const +IDL_GlobalData::recursion_start () const { return this->recursion_start_; } @@ -1651,7 +1651,7 @@ IDL_GlobalData::recursion_start (const char *val) } bool -IDL_GlobalData::multi_file_input (void) const +IDL_GlobalData::multi_file_input () const { return this->multi_file_input_; } @@ -1663,13 +1663,13 @@ IDL_GlobalData::multi_file_input (bool val) } const char * -IDL_GlobalData::big_file_name (void) const +IDL_GlobalData::big_file_name () const { return this->big_file_name_; } FE_Utils::T_PARAMLIST_INFO const * -IDL_GlobalData::current_params (void) const +IDL_GlobalData::current_params () const { return this->current_params_; } @@ -1682,7 +1682,7 @@ FE_Utils::T_PARAMLIST_INFO *params) } UTL_StrList const * -IDL_GlobalData::alias_params (void) const +IDL_GlobalData::alias_params () const { return this->alias_params_; } @@ -1695,7 +1695,7 @@ UTL_StrList *params) } UTL_StrList const * -IDL_GlobalData::for_new_holder (void) const +IDL_GlobalData::for_new_holder () const { return this->for_new_holder_; } @@ -1716,7 +1716,7 @@ IDL_GlobalData::set_dcps_sequence_type (const char* seq_type) bool IDL_GlobalData::dcps_sequence_type_defined (const char* seq_type) { - char **tmp = 0; + char **tmp = nullptr; for (ACE_Unbounded_Queue_Iterator<char *>riter ( this->dcps_sequence_types_list_); @@ -1776,7 +1776,7 @@ bool IDL_GlobalData::add_dcps_data_key (const char* id, const char* key) { // Search the map for the type. - DCPS_Data_Type_Info* newinfo = 0; + DCPS_Data_Type_Info* newinfo = nullptr; if (this->dcps_type_info_map_.find (id, newinfo) == 0) { @@ -1814,11 +1814,11 @@ IDL_GlobalData::is_dcps_type (UTL_ScopedName* target) } // No joy. - return 0; + return nullptr; } AST_Module * -IDL_GlobalData::corba_module (void) const +IDL_GlobalData::corba_module () const { return this->corba_module_; } @@ -1830,7 +1830,7 @@ IDL_GlobalData::corba_module (AST_Module *m) } IDL_GlobalData::Unbounded_Paths_Queue & -IDL_GlobalData::include_paths (void) +IDL_GlobalData::include_paths () { return this->include_paths_; } @@ -1850,7 +1850,7 @@ IDL_GlobalData::explicit_anon_type_diagnostic () const } bool -IDL_GlobalData::anon_error (void) const +IDL_GlobalData::anon_error () const { if (idl_version_ >= IDL_VERSION_4 && !explicit_anon_type_diagnostic_) { return false; @@ -1859,7 +1859,7 @@ IDL_GlobalData::anon_error (void) const } bool -IDL_GlobalData::anon_warning (void) const +IDL_GlobalData::anon_warning () const { if (idl_version_ >= IDL_VERSION_4 && !explicit_anon_type_diagnostic_) { return false; @@ -1868,7 +1868,7 @@ IDL_GlobalData::anon_warning (void) const } bool -IDL_GlobalData::anon_silent (void) const +IDL_GlobalData::anon_silent () const { if (idl_version_ >= IDL_VERSION_4 && !explicit_anon_type_diagnostic_) { return true; @@ -1877,7 +1877,7 @@ IDL_GlobalData::anon_silent (void) const } bool -IDL_GlobalData::in_typedef (void) const +IDL_GlobalData::in_typedef () const { return this->in_typedef_; } @@ -1889,7 +1889,7 @@ IDL_GlobalData::in_typedef (bool val) } bool -IDL_GlobalData::in_tmpl_mod_no_alias (void) const +IDL_GlobalData::in_tmpl_mod_no_alias () const { return this->in_tmpl_mod_no_alias_; } @@ -1901,7 +1901,7 @@ IDL_GlobalData::in_tmpl_mod_no_alias (bool val) } bool -IDL_GlobalData::in_tmpl_mod_alias (void) const +IDL_GlobalData::in_tmpl_mod_alias () const { return this->in_tmpl_mod_alias_; } @@ -1953,7 +1953,7 @@ namespace { public: explicit OldState (bool disable_output = false) - : old_filename_ (idl_global->filename () ? new UTL_String (idl_global->filename (), true) : 0), + : old_filename_ (idl_global->filename () ? new UTL_String (idl_global->filename (), true) : nullptr), // need a copy because IDL_GlobalData::set_filename() destroys previous value old_lineno_ (idl_global->lineno ()), old_idl_src_file_ (idl_global->idl_src_file ()), @@ -1964,7 +1964,7 @@ namespace idl_global->in_eval_ = true; idl_global->set_lineno (1); - idl_global->set_filename (0); + idl_global->set_filename (nullptr); // Name this pseudo-file "builtin-N" static char buffer[64]; @@ -1977,7 +1977,7 @@ namespace if (disable_output_) { - ACE_DEFAULT_LOG_STREAM->rdbuf (0); + ACE_DEFAULT_LOG_STREAM->rdbuf (nullptr); ACE_LOG_MSG->clr_flags (ACE_Log_Msg::STDERR); ACE_LOG_MSG->clr_flags (ACE_LOG_MSG->flags ()); } |