From 5065d96a15940cd9f5dacad37a10a6f28ba96d44 Mon Sep 17 00:00:00 2001 From: jmpenn Date: Thu, 18 Apr 2024 11:41:35 -0500 Subject: [PATCH] =?UTF-8?q?Pre-increment=20(rather=20than=20post-increment?= =?UTF-8?q?)=20STL=20iterators=20in=20for=20loops=E2=80=A6=20(#1692)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Pre-increment (rather than post-increment) STL iterators in for loops. #1594 * Fix a goof. #1594 --- include/trick/ClassSizeCheck.hh | 2 +- include/trick/checkpoint_sequence_stl.hh | 4 +-- .../src/SegmentedExecutive.cpp | 22 ++++++++-------- trick_sims/ODE/models/DrawStuff/DrawStuff.cpp | 4 +-- .../Interface_Code_Gen/ClassValues.cpp | 14 +++++----- .../Interface_Code_Gen/ClassVisitor.cpp | 6 ++--- .../Interface_Code_Gen/CommentSaver.cpp | 2 +- .../Interface_Code_Gen/FieldDescription.cpp | 2 +- .../Interface_Code_Gen/FieldVisitor.cpp | 2 +- .../Interface_Code_Gen/FindTrickICG.cpp | 6 ++--- .../Interface_Code_Gen/HeaderSearchDirs.cpp | 26 +++++++++---------- .../Interface_Code_Gen/PrintAttributes.cpp | 6 ++--- .../DataRecord/DataRecordDispatcher.cpp | 2 +- .../DataRecord/DataRecordGroup.cpp | 4 +-- .../sim_services/Environment/Environment.cpp | 2 +- .../EventManager/EventProcessor.cpp | 2 +- .../Executive/Executive_add_jobs_to_queue.cpp | 2 +- .../Executive/Executive_get_job.cpp | 2 +- .../Executive/Executive_remove_jobs.cpp | 2 +- .../Executive/Executive_remove_sim_object.cpp | 6 ++--- .../Executive/Executive_restart.cpp | 8 +++--- .../Executive/Executive_set_job_cycle.cpp | 2 +- .../Executive/Executive_set_job_onoff.cpp | 2 +- .../FrameLog/FrameDataRecordGroup.cpp | 2 +- .../sim_services/FrameLog/FrameLog.cpp | 20 +++++++------- .../sim_services/InputProcessor/IPPython.cpp | 2 +- .../JITInputFile/JITInputFile.cpp | 2 +- .../JSONVariableServerThread.cpp | 2 +- .../MemoryManager/MemoryManager.cpp | 2 +- .../MemoryManager/test/MM_stl_checkpoint.cc | 2 +- .../sim_services/Message/MessagePublisher.cpp | 4 +-- .../sim_services/RealtimeInjector/RtiExec.cpp | 2 +- .../sim_services/RealtimeInjector/RtiList.cpp | 4 +-- .../RealtimeInjector/RtiStager.cpp | 2 +- .../sim_services/Sie/AttributesMap.cpp | 4 +-- .../sim_services/Sie/EnumAttributesMap.cpp | 4 +-- trick_source/sim_services/Sie/Sie.cpp | 6 ++--- .../sim_services/SimObject/SimObject.cpp | 10 +++---- .../UdUnits/map_trick_units_to_udunits.cpp | 2 +- .../sim_services/UnitTest/UnitTest.cpp | 8 +++--- .../sim_services/UnitsMap/UnitsMap.cpp | 2 +- .../VariableServer/VariableServer.cpp | 2 +- .../VariableServer_copy_and_write_freeze.cpp | 2 +- ...Server_copy_and_write_freeze_scheduled.cpp | 2 +- ...ariableServer_copy_and_write_scheduled.cpp | 2 +- .../VariableServer_copy_and_write_top.cpp | 2 +- .../VariableServer_freeze_init.cpp | 2 +- ...riableServer_get_next_freeze_call_time.cpp | 2 +- ...VariableServer_get_next_sync_call_time.cpp | 2 +- .../trick_swig/PrimitiveAttributesMap.cpp | 2 +- .../CivetServer/src/VariableServerSession.cpp | 8 +++--- 51 files changed, 118 insertions(+), 118 deletions(-) diff --git a/include/trick/ClassSizeCheck.hh b/include/trick/ClassSizeCheck.hh index b132f2d3..983e81e7 100644 --- a/include/trick/ClassSizeCheck.hh +++ b/include/trick/ClassSizeCheck.hh @@ -61,7 +61,7 @@ namespace Trick { */ void print_nonzero_diffs() { std::map::iterator it ; - for ( it = name_to_diff.begin() ; it != name_to_diff.end() ; it++ ) { + for ( it = name_to_diff.begin() ; it != name_to_diff.end() ; ++it ) { int curr_diff = it->second.diff ; ATTRIBUTES * attr = Trick::AttributesMap::attributes_map()->get_attr(it->first) ; unsigned int ii ; diff --git a/include/trick/checkpoint_sequence_stl.hh b/include/trick/checkpoint_sequence_stl.hh index ce616692..11c147d0 100644 --- a/include/trick/checkpoint_sequence_stl.hh +++ b/include/trick/checkpoint_sequence_stl.hh @@ -64,7 +64,7 @@ int checkpoint_sequence_i(STL & in_stl , std::string object_name , std::string v //message_publish(1, "CHECKPOINT_SEQUENCE_STL with %s\n", var_declare) ; /* copy the contents of the stl */ - for ( ii = 0 , it = in_stl.begin() , end = in_stl.end() ; it != end ; it++ , ii++ ) { + for ( ii = 0 , it = in_stl.begin() , end = in_stl.end() ; it != end ; ++it , ii++ ) { items[ii] = *it ; } } @@ -103,7 +103,7 @@ int checkpoint_sequence_s(STL & in_stl , std::string object_name , std::string v //message_publish(1, "CHECKPOINT_SEQUENCE_STL_STL with %s\n", temp_str.c_str()) ; /* create the names of the sub stl checkpoint names we're going to be using */ - for ( ii = 0 , it = in_stl.begin() , end = in_stl.end() ; it != end ; it++ , ii++ ) { + for ( ii = 0 , it = in_stl.begin() , end = in_stl.end() ; it != end ; ++it , ii++ ) { std::ostringstream sub_elements ; sub_elements << object_name << "_" << var_name << "_" << ii ; items[ii] = sub_elements.str() ; diff --git a/test/SIM_segments/models/SegmentedExecutive/src/SegmentedExecutive.cpp b/test/SIM_segments/models/SegmentedExecutive/src/SegmentedExecutive.cpp index 6c72684f..5f217705 100644 --- a/test/SIM_segments/models/SegmentedExecutive/src/SegmentedExecutive.cpp +++ b/test/SIM_segments/models/SegmentedExecutive/src/SegmentedExecutive.cpp @@ -19,7 +19,7 @@ int Trick::SegmentedExecutive::add_segment( Trick::Segment * ps ) { // Gets the job class to job queue map for this segment and adds the job classes to the executive. std::map < std::string , Trick::ScheduledJobQueue * >::iterator it ; - for ( it = ps->get_job_queues().begin() ; it != ps->get_job_queues().end() ; it++ ) { + for ( it = ps->get_job_queues().begin() ; it != ps->get_job_queues().end() ; ++it ) { class_map[(*it).first] = num_classes ; class_to_queue[num_classes++] = (*it).second ; } @@ -41,7 +41,7 @@ int Trick::SegmentedExecutive::gather_segmented_jobs() { std::map < std::string , Trick::Segment * >::iterator mit ; std::set< std::string > segment_tags ; - for ( mit = segment_map.begin() ; mit != segment_map.end() ; mit++ ) { + for ( mit = segment_map.begin() ; mit != segment_map.end() ; ++mit ) { segment_tags.insert((*mit).first) ; } @@ -129,7 +129,7 @@ int Trick::SegmentedExecutive::segment_set_jobs_onoff() { Trick::JobData * job ; std::set < Trick::JobData * >::iterator it ; - for ( it = all_segmented_jobs.begin() ; it != all_segmented_jobs.end() ; it++ ) { + for ( it = all_segmented_jobs.begin() ; it != all_segmented_jobs.end() ; ++it ) { job = *it ; // Test to see if the next segment is present in the job tags. // Set the disabled flag to the negation of the tag's presence @@ -164,10 +164,10 @@ int Trick::SegmentedExecutive::write_s_job_execution(FILE *fp) { fprintf(fp, "Segment Jobs:\n") ; std::map < std::string , Trick::Segment * >::iterator pmit ; - for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; pmit++ ) { + for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; ++pmit ) { Trick::Segment * pb = (*pmit).second ; std::map < std::string , Trick::ScheduledJobQueue * >::iterator jqit ; - for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; jqit++ ) { + for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; ++jqit ) { (*jqit).second->write_non_sched_queue(fp) ; } } @@ -187,10 +187,10 @@ int Trick::SegmentedExecutive::instrument_job_before( Trick::JobData * instrumen //go through all of the segmented jobs and instrument them. std::map < std::string , Trick::Segment * >::iterator pmit ; - for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; pmit++ ) { + for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; ++pmit ) { Trick::Segment * pb = (*pmit).second ; std::map < std::string , Trick::ScheduledJobQueue * >::iterator jqit ; - for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; jqit++ ) { + for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; ++jqit ) { (*jqit).second->instrument_before(instrument_job) ; } } @@ -209,10 +209,10 @@ int Trick::SegmentedExecutive::instrument_job_after( Trick::JobData * instrument //go through all of the segmented jobs and instrument them. std::map < std::string , Trick::Segment * >::iterator pmit ; - for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; pmit++ ) { + for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; ++pmit ) { Trick::Segment * pb = (*pmit).second ; std::map < std::string , Trick::ScheduledJobQueue * >::iterator jqit ; - for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; jqit++ ) { + for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; ++jqit ) { (*jqit).second->instrument_after(instrument_job) ; } } @@ -226,10 +226,10 @@ int Trick::SegmentedExecutive::instrument_job_remove(std::string in_job) { Trick::Executive::instrument_job_remove( in_job ) ; std::map < std::string , Trick::Segment * >::iterator pmit ; - for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; pmit++ ) { + for ( pmit = segment_map.begin() ; pmit != segment_map.end() ; ++pmit ) { Trick::Segment * pb = (*pmit).second ; std::map < std::string , Trick::ScheduledJobQueue * >::iterator jqit ; - for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; jqit++ ) { + for ( jqit = pb->get_job_queues().begin() ; jqit != pb->get_job_queues().end() ; ++jqit ) { (*jqit).second->instrument_remove(in_job) ; } } diff --git a/trick_sims/ODE/models/DrawStuff/DrawStuff.cpp b/trick_sims/ODE/models/DrawStuff/DrawStuff.cpp index 4eec2295..ad335ed2 100644 --- a/trick_sims/ODE/models/DrawStuff/DrawStuff.cpp +++ b/trick_sims/ODE/models/DrawStuff/DrawStuff.cpp @@ -13,14 +13,14 @@ void DrawStuff::start() { void DrawStuff::step(int) { std::vector::iterator it ; - for( it = objects.begin() ; it != objects.end() ; it++ ) { + for( it = objects.begin() ; it != objects.end() ; ++it ) { (*it)->draw() ; } } void DrawStuff::command(int cmd) { std::vector::iterator it ; - for( it = objects.begin() ; it != objects.end() ; it++ ) { + for( it = objects.begin() ; it != objects.end() ; ++it ) { (*it)->command(cmd) ; } } diff --git a/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp b/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp index 9af34595..105e04c8 100644 --- a/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp +++ b/trick_source/codegen/Interface_Code_Gen/ClassValues.cpp @@ -22,7 +22,7 @@ ClassValues::ClassValues() : ClassValues::~ClassValues() { std::vector::iterator fdit ; - for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; fdit++ ) { + for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; ++fdit ) { delete (*fdit) ; } } @@ -57,7 +57,7 @@ void ClassValues::addInheritedFieldDescriptions(std::vector std::vector::iterator fdit ; // Loop through the incoming inherited variable names - for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) { + for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; ++fdit ) { (*fdit)->setBaseClassOffset( class_offset ) ; (*fdit)->setInherited( true ) ; @@ -72,7 +72,7 @@ void ClassValues::addInheritedFieldDescriptions(std::vector #else { #endif - for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; fdit++ ) { + for ( fdit = in_fdes.begin() ; fdit != in_fdes.end() ; ++fdit ) { std::string in_name = (*fdit)->getName() ; // search existing names for incoming inherited variable name. @@ -113,7 +113,7 @@ void ClassValues::addInheritedFieldDescriptions(std::vector void ClassValues::saveInheritAncestry( ClassValues * in_cv ) { std::map< std::string , unsigned int >::iterator mit ; - for ( mit = in_cv->all_inherited_class_names_map.begin() ; mit != in_cv->all_inherited_class_names_map.end() ; mit++ ) { + for ( mit = in_cv->all_inherited_class_names_map.begin() ; mit != in_cv->all_inherited_class_names_map.end() ; ++mit ) { all_inherited_class_names_map[(*mit).first] += (*mit).second ; } @@ -123,7 +123,7 @@ void ClassValues::saveInheritAncestry( ClassValues * in_cv ) { void ClassValues::setContainerClassForFields() { std::vector::iterator fdit ; // Loop through all fields - for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; fdit++ ) { + for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; ++fdit ) { // Prepend the field container class with the current class name. (*fdit)->setContainerClass( name + "::" + (*fdit)->getContainerClass() ) ; } @@ -134,13 +134,13 @@ void ClassValues::clearAmbiguousVariables() { std::map< std::string , unsigned int >::iterator mit ; std::vector::iterator fdit ; - for ( mit = all_inherited_class_names_map.begin() ; mit != all_inherited_class_names_map.end() ; mit++ ) { + for ( mit = all_inherited_class_names_map.begin() ; mit != all_inherited_class_names_map.end() ; ++mit ) { // If a class in inherited more than once we have a diamond. We'll need to modify variables that were // inherited from that class. if ( (*mit).second > 1 ) { std::string str = (*mit).first + "::" ; // Loop through all fields testing for the diamond inherited class in the name. - for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; fdit++ ) { + for ( fdit = field_descripts.begin() ; fdit != field_descripts.end() ; ++fdit ) { std::string fdit_name = (*fdit)->getName() ; size_t f = fdit_name.find(str) ; // If the variable contains the diamond class string, remove the diamond class qualification. diff --git a/trick_source/codegen/Interface_Code_Gen/ClassVisitor.cpp b/trick_source/codegen/Interface_Code_Gen/ClassVisitor.cpp index 0f9d70bd..c5ef77fc 100644 --- a/trick_source/codegen/Interface_Code_Gen/ClassVisitor.cpp +++ b/trick_source/codegen/Interface_Code_Gen/ClassVisitor.cpp @@ -210,7 +210,7 @@ bool CXXRecordVisitor::VisitCXXRecordDecl( clang::CXXRecordDecl *rec ) { } else { // Test all constructors to see if any of those are the default and public clang::CXXRecordDecl::ctor_iterator cit ; - for ( cit = rec->ctor_begin() ; cit != rec->ctor_end() ; cit++ ) { + for ( cit = rec->ctor_begin() ; cit != rec->ctor_end() ; ++cit ) { if ( ( !(*cit)->isDeleted() ) and (*cit)->isDefaultConstructor() and (*cit)->getAccess() == clang::AS_public ) { cval.setHasDefaultConstructor(true) ; } @@ -234,7 +234,7 @@ bool CXXRecordVisitor::VisitCXXRecordDecl( clang::CXXRecordDecl *rec ) { //std::cout << "parsing " << cval.getName() << std::endl ; //std::cout << " processing inheritance " << rec->getNumBases() << " " << rec->getNumVBases() << "" << std::endl ; clang::CXXRecordDecl::base_class_iterator bcii ; - for ( bcii = rec->bases_begin() ; bcii != rec->bases_end() ; bcii++ ) { + for ( bcii = rec->bases_begin() ; bcii != rec->bases_end() ; ++bcii ) { if ( !bcii->isVirtual() ) { const clang::Type * temp = bcii->getType().getTypePtr() ; //std::cout << "\ninherited Type = " << temp->getTypeClassName() << "" << std::endl ; @@ -282,7 +282,7 @@ bool CXXRecordVisitor::VisitCXXRecordDecl( clang::CXXRecordDecl *rec ) { // When processing inherited classes include_virtual_base will be set to true // so we don't process virtual inherited classes multiple times. if ( include_virtual_base ) { - for ( bcii = rec->vbases_begin() ; bcii != rec->vbases_end() ; bcii++ ) { + for ( bcii = rec->vbases_begin() ; bcii != rec->vbases_end() ; ++bcii ) { const clang::Type * temp = bcii->getType().getTypePtr() ; //std::cout << "\ninherited Type = " << temp->getTypeClassName() << "" << std::endl ; const clang::RecordType * rt = temp->getAs() ; diff --git a/trick_source/codegen/Interface_Code_Gen/CommentSaver.cpp b/trick_source/codegen/Interface_Code_Gen/CommentSaver.cpp index ef5aaf4d..33e3b74b 100644 --- a/trick_source/codegen/Interface_Code_Gen/CommentSaver.cpp +++ b/trick_source/codegen/Interface_Code_Gen/CommentSaver.cpp @@ -60,7 +60,7 @@ std::string CommentSaver::getTrickHeaderComment( std::string file_name ) { if ( resolved_path != NULL ) { if ( trick_header_comments.find(resolved_path) == trick_header_comments.end() ) { trick_header_comments[resolved_path] = std::string() ; - for ( cit = comment_map[resolved_path].begin() ; cit != comment_map[resolved_path].end() ; cit++ ) { + for ( cit = comment_map[resolved_path].begin() ; cit != comment_map[resolved_path].end() ; ++cit ) { std::string comment_str = getComment((*cit).second) ; if ( comment_str.find("@trick_parse") != std::string::npos or comment_str.find("\\trick_parse") != std::string::npos ) { diff --git a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp index f1519ff2..2fd8a0aa 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldDescription.cpp @@ -304,7 +304,7 @@ void FieldDescription::parseComment(std::string comment) { // escape special characters, convert tabs and newlines to spaces, remove multiple spaces. std::ostringstream ss ; bool is_space = false ; - for (std::string::iterator it = comment.begin(); it != comment.end(); it++) { + for (std::string::iterator it = comment.begin(); it != comment.end(); ++it) { switch (*it) { case '\\': ss << "\\\\"; is_space = false ; break; case '"': ss << "\\\""; is_space = false ; break; diff --git a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp index 79bf2af8..e88d71d4 100644 --- a/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FieldVisitor.cpp @@ -442,7 +442,7 @@ bool FieldVisitor::VisitRecordType(clang::RecordType *rt) { // Test if we have some type from STL. if (!tst_string.compare( 0 , 5 , "std::")) { // If we have some type from std, figure out if it is one we support. - for ( std::map::iterator it = stl_classes.begin() ; it != stl_classes.end() ; it++ ) { + for ( std::map::iterator it = stl_classes.begin() ; it != stl_classes.end() ; ++it ) { /* Mark STL types that are not strings and exit */ if (!tst_string.compare( 0 , (*it).first.size() , (*it).first)) { diff --git a/trick_source/codegen/Interface_Code_Gen/FindTrickICG.cpp b/trick_source/codegen/Interface_Code_Gen/FindTrickICG.cpp index eab21e2a..9501b1fc 100644 --- a/trick_source/codegen/Interface_Code_Gen/FindTrickICG.cpp +++ b/trick_source/codegen/Interface_Code_Gen/FindTrickICG.cpp @@ -80,7 +80,7 @@ void FindTrickICG::If(clang::SourceLocation Loc, clang::SourceRange ConditionRan if ( ref.str().find("TRICK_ICG") != std::string::npos ) { // for each header in the stack, mark them as being exposed to TRICK_ICG std::vector::iterator it ; - for ( it = included_files.begin() ; it != included_files.end() ; it++ ) { + for ( it = included_files.begin() ; it != included_files.end() ; ++it ) { hsd.addTrickICGFoundFile(*it) ; } // print warning messages. @@ -124,7 +124,7 @@ void FindTrickICG::Ifdef(clang::SourceLocation Loc, const clang::Token &MacroNam if ( (loc_str.find("S_source.hh") == std::string::npos) ) { // for each header in the stack, mark them as being exposed to TRICK_ICG std::vector::iterator it ; - for ( it = included_files.begin() ; it != included_files.end() ; it++ ) { + for ( it = included_files.begin() ; it != included_files.end() ; ++it ) { hsd.addTrickICGFoundFile(*it) ; } // print warning messages. @@ -149,7 +149,7 @@ void FindTrickICG::Ifndef(clang::SourceLocation Loc, const clang::Token &MacroNa std::string loc_str = Loc.printToString(ci.getSourceManager()) ; // for each header in the stack, mark them as being exposed to TRICK_ICG std::vector::iterator it ; - for ( it = included_files.begin() ; it != included_files.end() ; it++ ) { + for ( it = included_files.begin() ; it != included_files.end() ; ++it ) { hsd.addTrickICGFoundFile(*it) ; } // print warning messages. diff --git a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp index a2fe7046..347c277e 100644 --- a/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp +++ b/trick_source/codegen/Interface_Code_Gen/HeaderSearchDirs.cpp @@ -186,13 +186,13 @@ void HeaderSearchDirs::ApplyHeaderSearchOptions () { clang::ApplyHeaderSearchOptions( hs , hso , pp.getLangOpts() , pp.getTargetInfo().getTriple() ) ; //clang::HeaderSearch::search_dir_iterator sdi ; /* - for ( sdi = hs.quoted_dir_begin() ; sdi != hs.quoted_dir_end() ; sdi++ ) { + for ( sdi = hs.quoted_dir_begin() ; sdi != hs.quoted_dir_end() ; ++sdi ) { std::cout << "quoted dir " << (*sdi).getName() << std::endl ; } - for ( sdi = hs.angled_dir_begin() ; sdi != hs.angled_dir_end() ; sdi++ ) { + for ( sdi = hs.angled_dir_begin() ; sdi != hs.angled_dir_end() ; ++sdi ) { std::cout << "angled dir " << (*sdi).getName() << std::endl ; } - for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; sdi++ ) { + for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; ++sdi ) { std::cout << "system dir " << (*sdi).getName() << std::endl ; } */ @@ -229,7 +229,7 @@ bool HeaderSearchDirs::isPathInUserDir (const std::string& in_dir ) { for ( clang::ConstSearchDirIterator sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; sdi = std::next(sdi) ) #else clang::HeaderSearch::search_dir_iterator sdi ; - for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; sdi++ ) + for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; ++sdi ) #endif { #if (LIBCLANG_MAJOR < 4) // TODO delete when RHEL 7 no longer supported @@ -261,7 +261,7 @@ bool HeaderSearchDirs::isPathInUserOrTrickDir (const std::string& in_dir ) { for ( clang::ConstSearchDirIterator sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; sdi = std::next(sdi) ) #else clang::HeaderSearch::search_dir_iterator sdi ; - for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; sdi++ ) + for ( sdi = hs.system_dir_begin() ; sdi != hs.system_dir_end() ; ++sdi ) #endif { #if (LIBCLANG_MAJOR < 4) // TODO delete when RHEL 7 no longer supported @@ -279,7 +279,7 @@ bool HeaderSearchDirs::isPathInUserOrTrickDir (const std::string& in_dir ) { bool HeaderSearchDirs::isPathInExclude (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = exclude_dirs.begin() ; vit != exclude_dirs.end() ; vit++ ) { + for ( vit = exclude_dirs.begin() ; vit != exclude_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return true ; } @@ -291,7 +291,7 @@ bool HeaderSearchDirs::isPathInExclude (const std::string& in_dir ) { bool HeaderSearchDirs::isPathInICGExclude (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = icg_exclude_dirs.begin() ; vit != icg_exclude_dirs.end() ; vit++ ) { + for ( vit = icg_exclude_dirs.begin() ; vit != icg_exclude_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return true ; } @@ -303,7 +303,7 @@ bool HeaderSearchDirs::isPathInICGExclude (const std::string& in_dir ) { bool HeaderSearchDirs::isPathInExtLib (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = ext_lib_dirs.begin() ; vit != ext_lib_dirs.end() ; vit++ ) { + for ( vit = ext_lib_dirs.begin() ; vit != ext_lib_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return true ; } @@ -318,7 +318,7 @@ bool HeaderSearchDirs::isPathInICGNoComment (const std::string& in_dir ) { } else { std::vector::iterator vit ; - for ( vit = icg_nocomment_dirs.begin() ; vit != icg_nocomment_dirs.end() ; vit++ ) { + for ( vit = icg_nocomment_dirs.begin() ; vit != icg_nocomment_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { icg_nocomment_files[in_dir] = true ; return true; @@ -332,7 +332,7 @@ bool HeaderSearchDirs::isPathInICGNoComment (const std::string& in_dir ) { bool HeaderSearchDirs::isPathInCompat15 (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = compat15_dirs.begin() ; vit != compat15_dirs.end() ; vit++ ) { + for ( vit = compat15_dirs.begin() ; vit != compat15_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return true ; } @@ -347,7 +347,7 @@ bool HeaderSearchDirs::isPathInCompat15 (const std::string& in_dir ) { std::string HeaderSearchDirs::getPathInExclude (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = exclude_dirs.begin() ; vit != exclude_dirs.end() ; vit++ ) { + for ( vit = exclude_dirs.begin() ; vit != exclude_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return (*vit) ; } @@ -359,7 +359,7 @@ std::string HeaderSearchDirs::getPathInExclude (const std::string& in_dir ) { std::string HeaderSearchDirs::getPathInICGExclude (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = icg_exclude_dirs.begin() ; vit != icg_exclude_dirs.end() ; vit++ ) { + for ( vit = icg_exclude_dirs.begin() ; vit != icg_exclude_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return (*vit) ; } @@ -371,7 +371,7 @@ std::string HeaderSearchDirs::getPathInICGExclude (const std::string& in_dir ) { std::string HeaderSearchDirs::getPathInExtLib (const std::string& in_dir ) { std::vector::iterator vit ; - for ( vit = ext_lib_dirs.begin() ; vit != ext_lib_dirs.end() ; vit++ ) { + for ( vit = ext_lib_dirs.begin() ; vit != ext_lib_dirs.end() ; ++vit ) { if ( ! in_dir.compare(0, (*vit).size(), (*vit))) { return (*vit) ; } diff --git a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp index 1e1fc79d..758a84cd 100644 --- a/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp +++ b/trick_source/codegen/Interface_Code_Gen/PrintAttributes.cpp @@ -449,7 +449,7 @@ void PrintAttributes::printIOMakefile() { << "IO_OBJECTS =" ; std::map< std::string , std::string >::iterator mit ; - for ( mit = all_io_files.begin() ; mit != all_io_files.end() ; mit++ ) { + for ( mit = all_io_files.begin() ; mit != all_io_files.end() ; ++mit ) { size_t found ; found = (*mit).second.find_last_of(".") ; makefile_io_src << " \\\n " << (*mit).second.substr(0,found) << ".o" ; @@ -487,7 +487,7 @@ void PrintAttributes::printIOMakefile() { ICG_processed.open("build/ICG_processed") ; makefile_ICG << "build/Makefile_io_src:" ; - for ( mit = all_io_files.begin() ; mit != all_io_files.end() ; mit++ ) { + for ( mit = all_io_files.begin() ; mit != all_io_files.end() ; ++mit ) { makefile_ICG << " \\\n " << (*mit).first ; size_t found ; found = (*mit).second.find_last_of(".") ; @@ -518,7 +518,7 @@ void PrintAttributes::printICGNoFiles() { if ( ! sim_services_flag ) { std::vector< std::string >::iterator it ; std::ofstream icg_no_outfile("build/ICG_no_found") ; - for ( it = icg_no_files.begin() ; it != icg_no_files.end() ; it++ ) { + for ( it = icg_no_files.begin() ; it != icg_no_files.end() ; ++it ) { icg_no_outfile << (*it) << std::endl ; } icg_no_outfile.close() ; diff --git a/trick_source/sim_services/DataRecord/DataRecordDispatcher.cpp b/trick_source/sim_services/DataRecord/DataRecordDispatcher.cpp index 19911b21..ac75689c 100644 --- a/trick_source/sim_services/DataRecord/DataRecordDispatcher.cpp +++ b/trick_source/sim_services/DataRecord/DataRecordDispatcher.cpp @@ -182,7 +182,7 @@ void Trick::DataRecordDispatcher::remove_all_groups() { Trick::DataRecordGroup * Trick::DataRecordDispatcher::get_group(std::string in_name) { std::vector ::iterator it ; - for ( it = groups.begin() ; it != groups.end() ; it++ ) { + for ( it = groups.begin() ; it != groups.end() ; ++it ) { if ( ! (*it)->get_group_name().compare(in_name) ) return *it ; } diff --git a/trick_source/sim_services/DataRecord/DataRecordGroup.cpp b/trick_source/sim_services/DataRecord/DataRecordGroup.cpp index d9266e72..5808e9dc 100644 --- a/trick_source/sim_services/DataRecord/DataRecordGroup.cpp +++ b/trick_source/sim_services/DataRecord/DataRecordGroup.cpp @@ -512,7 +512,7 @@ int Trick::DataRecordGroup::restart() { std::vector ::iterator drb_it ; /* delete the current rec_buffer */ - for ( drb_it = rec_buffer.begin() ; drb_it != rec_buffer.end() ; drb_it++ ) { + for ( drb_it = rec_buffer.begin() ; drb_it != rec_buffer.end() ; ++drb_it ) { delete *drb_it ; } rec_buffer.clear() ; @@ -520,7 +520,7 @@ int Trick::DataRecordGroup::restart() { add_time_variable() ; /* delete the current change_buffer contents */ - for ( drb_it = change_buffer.begin() ; drb_it != change_buffer.end() ; drb_it++ ) { + for ( drb_it = change_buffer.begin() ; drb_it != change_buffer.end() ; ++drb_it ) { delete *drb_it ; } change_buffer.clear() ; diff --git a/trick_source/sim_services/Environment/Environment.cpp b/trick_source/sim_services/Environment/Environment.cpp index a7de3366..17ebe4fc 100644 --- a/trick_source/sim_services/Environment/Environment.cpp +++ b/trick_source/sim_services/Environment/Environment.cpp @@ -44,7 +44,7 @@ int Trick::Environment::print_vars( FILE * fp ) { std::map::iterator it ; - for ( it = local_env.begin() ; it != local_env.end() ; it++ ) { + for ( it = local_env.begin() ; it != local_env.end() ; ++it ) { fprintf(fp, "%s = %s\n", it->first.c_str(), it->second.c_str()); } diff --git a/trick_source/sim_services/EventManager/EventProcessor.cpp b/trick_source/sim_services/EventManager/EventProcessor.cpp index 76032584..1ee3fa1e 100644 --- a/trick_source/sim_services/EventManager/EventProcessor.cpp +++ b/trick_source/sim_services/EventManager/EventProcessor.cpp @@ -30,7 +30,7 @@ void Trick::EventProcessor::add_event(Trick::Event * in_event) { */ void Trick::EventProcessor::remove_event(Trick::Event * in_event) { std::multiset< Trick::Event *, CompareEventPtrs >::iterator sit = event_set.begin() ; - for (sit=event_set.begin(); sit!=event_set.end(); sit++) { + for (sit=event_set.begin(); sit!=event_set.end(); ++sit) { if ((*sit) == in_event) { event_set.erase(sit) ; break; diff --git a/trick_source/sim_services/Executive/Executive_add_jobs_to_queue.cpp b/trick_source/sim_services/Executive/Executive_add_jobs_to_queue.cpp index db712c34..eadbb8d9 100644 --- a/trick_source/sim_services/Executive/Executive_add_jobs_to_queue.cpp +++ b/trick_source/sim_services/Executive/Executive_add_jobs_to_queue.cpp @@ -148,7 +148,7 @@ int Trick::Executive::add_job_to_queue( Trick::JobData * job ) { /* Add job to convienience constructs for easy retrival */ all_jobs.insert(std::pair(job->name,job)) ; all_jobs_vector.push_back(job) ; - for ( it = job->tags_begin() ; it != job->tags_end() ; it++ ) { + for ( it = job->tags_begin() ; it != job->tags_end() ; ++it ) { all_tagged_jobs.insert(std::pair(*it,job)) ; } diff --git a/trick_source/sim_services/Executive/Executive_get_job.cpp b/trick_source/sim_services/Executive/Executive_get_job.cpp index 65eabce5..1289ef4f 100644 --- a/trick_source/sim_services/Executive/Executive_get_job.cpp +++ b/trick_source/sim_services/Executive/Executive_get_job.cpp @@ -15,7 +15,7 @@ Trick::JobData * Trick::Executive::get_job(std::string job_name, unsigned int j_ range = all_jobs.equal_range(job_name) ; /** @li Move to the j_instance-th item in the list */ - for ( it = range.first , ii = 1 ; (it != range.second) && (ii < j_instance) ; it++ , ii++ ) ; + for ( it = range.first , ii = 1 ; (it != range.second) && (ii < j_instance) ; ++it , ii++ ) ; /** @li If the j_instance-th item doesn't exist return NULL */ if ( it == range.second ) { diff --git a/trick_source/sim_services/Executive/Executive_remove_jobs.cpp b/trick_source/sim_services/Executive/Executive_remove_jobs.cpp index 1cfcb8c6..00799dc0 100644 --- a/trick_source/sim_services/Executive/Executive_remove_jobs.cpp +++ b/trick_source/sim_services/Executive/Executive_remove_jobs.cpp @@ -40,7 +40,7 @@ int Trick::Executive::remove_jobs( Trick::SimObject * in_sim_object ) { } /* search the executive queues for the job and remove it if found */ - for ( std::vector ::iterator jit = in_sim_object->jobs.begin() ; jit != in_sim_object->jobs.end() ; jit++ ) { + for ( std::vector ::iterator jit = in_sim_object->jobs.begin() ; jit != in_sim_object->jobs.end() ; ++jit ) { std::map::iterator class_id_it ; std::map::iterator queue_it ; Trick::ScheduledJobQueue * curr_queue ; diff --git a/trick_source/sim_services/Executive/Executive_remove_sim_object.cpp b/trick_source/sim_services/Executive/Executive_remove_sim_object.cpp index 665e7fab..8682ea3e 100644 --- a/trick_source/sim_services/Executive/Executive_remove_sim_object.cpp +++ b/trick_source/sim_services/Executive/Executive_remove_sim_object.cpp @@ -17,7 +17,7 @@ int Trick::Executive::delete_sim_object( Trick::SimObject * in_object ) { std::vector ::iterator so_it ; std::vector ::iterator sched_it ; - for ( so_it = in_object->pre_component_objects.begin() ; so_it != in_object->pre_component_objects.end() ; so_it++ ) { + for ( so_it = in_object->pre_component_objects.begin() ; so_it != in_object->pre_component_objects.end() ; ++so_it ) { delete_sim_object((*so_it)) ; } @@ -31,11 +31,11 @@ int Trick::Executive::delete_sim_object( Trick::SimObject * in_object ) { remove_jobs( in_object ) ; - for ( sched_it = other_schedulers.begin() ; sched_it != other_schedulers.end() ; sched_it++ ) { + for ( sched_it = other_schedulers.begin() ; sched_it != other_schedulers.end() ; ++sched_it ) { (*sched_it)->delete_sim_object(in_object) ; } - for ( so_it = in_object->post_component_objects.begin() ; so_it != in_object->post_component_objects.end() ; so_it++ ) { + for ( so_it = in_object->post_component_objects.begin() ; so_it != in_object->post_component_objects.end() ; ++so_it ) { delete_sim_object((*so_it)) ; } diff --git a/trick_source/sim_services/Executive/Executive_restart.cpp b/trick_source/sim_services/Executive/Executive_restart.cpp index 7cd6fec3..9837e7d8 100644 --- a/trick_source/sim_services/Executive/Executive_restart.cpp +++ b/trick_source/sim_services/Executive/Executive_restart.cpp @@ -44,8 +44,8 @@ int Trick::Executive::restart() { all_tagged_jobs.clear() ; /* Create a temporary all_jobs map to use to restore job data from all_jobs_for_checkpoint */ - for ( sit = sim_objects.begin() ; sit != sim_objects.end() ; sit++ ) { - for ( jit = (*sit)->jobs.begin() ; jit != (*sit)->jobs.end() ; jit++ ) { + for ( sit = sim_objects.begin() ; sit != sim_objects.end() ; ++sit ) { + for ( jit = (*sit)->jobs.begin() ; jit != (*sit)->jobs.end() ; ++jit ) { /* Dynamically created sim_objects, like data_recording objects, require that some of the job class data be repopulated before we start copying job data back into the sim. */ @@ -67,7 +67,7 @@ int Trick::Executive::restart() { message_publish(MSG_ERROR, "Could not find job %s\n", all_jobs_for_checkpoint[ii].name.c_str()) ; exec_terminate_with_return( -1 , __FILE__ , __LINE__ , "Job in checkpoint file does not exist in current sim." ) ; } else { - for ( it = ret.first ; it != ret.second ; it++ ) { + for ( it = ret.first ; it != ret.second ; ++it ) { // The JobData::id and JobData::sim_object_id together uniquely identify a job. if (( it->second->id == all_jobs_for_checkpoint[ii].id ) && ( it->second->sim_object_id == all_jobs_for_checkpoint[ii].sim_object_id )) { @@ -80,7 +80,7 @@ int Trick::Executive::restart() { /* restore the executive sim_objects vector from the checkpoint and add back all of the jobs to the schedulers */ - for ( sit = sim_objects.begin() ; sit != sim_objects.end() ; sit++ ) { + for ( sit = sim_objects.begin() ; sit != sim_objects.end() ; ++sit ) { add_jobs_to_queue(*sit, true) ; for ( ii = 0 ; ii < other_schedulers.size() ; ii++ ) { other_schedulers[ii]->add_sim_object(*sit) ; diff --git a/trick_source/sim_services/Executive/Executive_set_job_cycle.cpp b/trick_source/sim_services/Executive/Executive_set_job_cycle.cpp index 4ecb2d1d..425faaf2 100644 --- a/trick_source/sim_services/Executive/Executive_set_job_cycle.cpp +++ b/trick_source/sim_services/Executive/Executive_set_job_cycle.cpp @@ -27,7 +27,7 @@ int Trick::Executive::set_job_cycle(std::string job_name, int instance_num, doub range = all_tagged_jobs.equal_range(job_name) ; if (range.first != range.second) { // set cycle for all jobs with this tag - for ( it = range.first; it != range.second ; it++ ) { + for ( it = range.first; it != range.second ; ++it ) { (*it).second->set_cycle(in_cycle) ; (*it).second->set_next_call_time(time_tics) ; } diff --git a/trick_source/sim_services/Executive/Executive_set_job_onoff.cpp b/trick_source/sim_services/Executive/Executive_set_job_onoff.cpp index 0a94105a..07aa5e7d 100644 --- a/trick_source/sim_services/Executive/Executive_set_job_onoff.cpp +++ b/trick_source/sim_services/Executive/Executive_set_job_onoff.cpp @@ -21,7 +21,7 @@ int Trick::Executive::set_job_onoff(std::string job_name, int instance_num , int range = all_tagged_jobs.equal_range(job_name) ; if (range.first != range.second) { // set disabled flag accordingly for all jobs with this tag - for ( it = range.first; it != range.second ; it++ ) { + for ( it = range.first; it != range.second ; ++it ) { it->second->disabled = !on ; } } else { diff --git a/trick_source/sim_services/FrameLog/FrameDataRecordGroup.cpp b/trick_source/sim_services/FrameLog/FrameDataRecordGroup.cpp index af11b6a6..c0da71b2 100644 --- a/trick_source/sim_services/FrameLog/FrameDataRecordGroup.cpp +++ b/trick_source/sim_services/FrameLog/FrameDataRecordGroup.cpp @@ -33,7 +33,7 @@ int Trick::FrameDataRecordGroup::frame_log_clear() { return 0 ; } std::vector< Trick::JobData *>::iterator it ; - for ( it = rec_jobs.begin() ; it != rec_jobs.end() ; it++ ) { + for ( it = rec_jobs.begin() ; it != rec_jobs.end() ; ++it ) { (*it)->frame_time = 0 ; (*it)->frame_time_seconds = 0.0; } diff --git a/trick_source/sim_services/FrameLog/FrameLog.cpp b/trick_source/sim_services/FrameLog/FrameLog.cpp index 66715a2b..e392e683 100644 --- a/trick_source/sim_services/FrameLog/FrameLog.cpp +++ b/trick_source/sim_services/FrameLog/FrameLog.cpp @@ -177,7 +177,7 @@ void Trick::FrameLog::add_recording_vars_for_jobs() { /* set the recoring job be and end of frame job. Set each recording group to it's proper thread. */ std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() , ii = 0 ; fdrg_it != drg_users.end() ; fdrg_it++ , ii++ ) { + for ( fdrg_it = drg_users.begin() , ii = 0 ; fdrg_it != drg_users.end() ; ++fdrg_it , ii++ ) { (*fdrg_it)->set_job_class("end_of_frame") ; (*fdrg_it)->set_phase(65533); (*fdrg_it)->set_thread(ii); @@ -251,7 +251,7 @@ void Trick::FrameLog::add_recording_vars_for_frame() { */ void Trick::FrameLog::add_recording_groups_to_sim() { std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; fdrg_it++ ) { + for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; ++fdrg_it ) { add_data_record_group( *fdrg_it , Trick::DR_Ring_Buffer) ; } add_data_record_group(drg_trick, Trick::DR_Ring_Buffer) ; @@ -267,7 +267,7 @@ void Trick::FrameLog::add_recording_groups_to_sim() { */ void Trick::FrameLog::remove_recording_groups_from_sim() { std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; fdrg_it++ ) { + for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; ++fdrg_it ) { remove_data_record_group( *fdrg_it) ; } remove_data_record_group(drg_trick) ; @@ -283,7 +283,7 @@ void Trick::FrameLog::remove_recording_groups_from_sim() { */ void Trick::FrameLog::enable_recording_groups() { std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; fdrg_it++ ) { + for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; ++fdrg_it ) { (*fdrg_it)->enable() ; } drg_trick->enable() ; @@ -299,7 +299,7 @@ void Trick::FrameLog::enable_recording_groups() { */ void Trick::FrameLog::disable_recording_groups() { std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; fdrg_it++ ) { + for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; ++fdrg_it ) { (*fdrg_it)->disable() ; } drg_trick->disable() ; @@ -315,7 +315,7 @@ void Trick::FrameLog::disable_recording_groups() { */ void Trick::FrameLog::init_recording_groups() { std::vector< Trick::FrameDataRecordGroup *>::iterator fdrg_it ; - for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; fdrg_it++ ) { + for ( fdrg_it = drg_users.begin() ; fdrg_it != drg_users.end() ; ++fdrg_it ) { (*fdrg_it)->init() ; } drg_trick->init() ; @@ -481,7 +481,7 @@ int Trick::FrameLog::set_max_samples(int num) { timeline_other[ii] = (Trick::timeline_t *)realloc( timeline_other[ii], tl_max_samples*sizeof(Trick::timeline_t)); } std::vector< Trick::FrameDataRecordGroup *>::iterator it ; - for ( it = drg_users.begin() ; it != drg_users.end() ; it++ ) { + for ( it = drg_users.begin() ; it != drg_users.end() ; ++it ) { (*it)->set_max_buffer_size(num) ; } drg_trick->set_max_buffer_size(num) ; @@ -527,7 +527,7 @@ int Trick::FrameLog::clear_data_record_info() { remove_recording_groups_from_sim() ; std::vector< Trick::FrameDataRecordGroup *>::iterator it ; - for ( it = drg_users.begin() ; it != drg_users.end() ; it++ ) { + for ( it = drg_users.begin() ; it != drg_users.end() ; ++it ) { (*it)->clear_checkpoint_vars() ; } drg_trick->clear_checkpoint_vars() ; @@ -549,7 +549,7 @@ clear_data_record_info. int Trick::FrameLog::restart() { // removing the data record groups removed the restart jobs too. call them here. std::vector< Trick::FrameDataRecordGroup *>::iterator it ; - for ( it = drg_users.begin() ; it != drg_users.end() ; it++ ) { + for ( it = drg_users.begin() ; it != drg_users.end() ; ++it ) { (*it)->restart() ; } drg_trick->restart() ; @@ -844,7 +844,7 @@ int Trick::FrameLog::create_DP_job_files() { total_plots = drg_users[ii]->rec_buffer.size(); std::vector ::iterator drb_it ; bg_color = (char *)"cornsilk2"; - for ( drb_it = drg_users[ii]->rec_buffer.begin() + 1 ; drb_it != drg_users[ii]->rec_buffer.end() ; drb_it++ ) { + for ( drb_it = drg_users[ii]->rec_buffer.begin() + 1 ; drb_it != drg_users[ii]->rec_buffer.end() ; ++drb_it ) { if ( ! (*drb_it)->name.compare(0, 5, "frame") ) continue ; // plots_per_page job plots per page if ((plots == 0) || (plots > plots_per_page)) { diff --git a/trick_source/sim_services/InputProcessor/IPPython.cpp b/trick_source/sim_services/InputProcessor/IPPython.cpp index 0ecafeea..e259ff7a 100644 --- a/trick_source/sim_services/InputProcessor/IPPython.cpp +++ b/trick_source/sim_services/InputProcessor/IPPython.cpp @@ -46,7 +46,7 @@ static PyThreadState *_save = NULL; void Trick::IPPython::get_TMM_named_variables() { //std::cout << "top level names at initialization" << std::endl ; Trick::ALLOC_INFO_MAP_ITER aim_it ; - for ( aim_it = trick_MM->alloc_info_map_begin() ; aim_it != trick_MM->alloc_info_map_end() ; aim_it++ ) { + for ( aim_it = trick_MM->alloc_info_map_begin() ; aim_it != trick_MM->alloc_info_map_end() ; ++aim_it ) { ALLOC_INFO * alloc_info = (*aim_it).second ; if ( alloc_info->name != NULL and alloc_info->user_type_name != NULL ) { std::stringstream ss ; diff --git a/trick_source/sim_services/JITInputFile/JITInputFile.cpp b/trick_source/sim_services/JITInputFile/JITInputFile.cpp index 1393f10c..7447b066 100644 --- a/trick_source/sim_services/JITInputFile/JITInputFile.cpp +++ b/trick_source/sim_services/JITInputFile/JITInputFile.cpp @@ -264,7 +264,7 @@ int Trick::JITInputFile::add_library(std::string lib_name) { void * Trick::JITInputFile::find_symbol(std::string sym) { std::map< std::string , JITLibInfo >::iterator it ; - for ( it = file_to_libinfo_map.begin() ; it != file_to_libinfo_map.end() ; it++ ) { + for ( it = file_to_libinfo_map.begin() ; it != file_to_libinfo_map.end() ; ++it ) { void * ret = (*it).second.find_symbol(sym) ; if (ret != NULL) { return ret ; diff --git a/trick_source/sim_services/JSONVariableServer/JSONVariableServerThread.cpp b/trick_source/sim_services/JSONVariableServer/JSONVariableServerThread.cpp index d9b37390..af03e8d8 100644 --- a/trick_source/sim_services/JSONVariableServer/JSONVariableServerThread.cpp +++ b/trick_source/sim_services/JSONVariableServer/JSONVariableServerThread.cpp @@ -225,7 +225,7 @@ int Trick::JSONVariableServerThread::get_vars( std::stringstream & body , char * if ( path[0] == '\0' ) { Trick::ALLOC_INFO_MAP_ITER aim_it ; bool first_item = true ; - for ( aim_it = trick_MM->alloc_info_map_begin() ; aim_it != trick_MM->alloc_info_map_end() ; aim_it++ ) { + for ( aim_it = trick_MM->alloc_info_map_begin() ; aim_it != trick_MM->alloc_info_map_end() ; ++aim_it ) { ALLOC_INFO * alloc_info = (*aim_it).second ; if ( alloc_info->name != NULL and alloc_info->user_type_name != NULL ) { if ( first_item == true ) { diff --git a/trick_source/sim_services/MemoryManager/MemoryManager.cpp b/trick_source/sim_services/MemoryManager/MemoryManager.cpp index 801554da..1cb398a6 100644 --- a/trick_source/sim_services/MemoryManager/MemoryManager.cpp +++ b/trick_source/sim_services/MemoryManager/MemoryManager.cpp @@ -80,7 +80,7 @@ Trick::MemoryManager::~MemoryManager() { delete defaultCheckPointAgent ; - for ( ait = alloc_info_map.begin() ; ait != alloc_info_map.end() ; ait++ ) { + for ( ait = alloc_info_map.begin() ; ait != alloc_info_map.end() ; ++ait ) { ALLOC_INFO * ai_ptr = (*ait).second ; if (ai_ptr->stcl == TRICK_LOCAL) { if ( ai_ptr->alloc_type == TRICK_ALLOC_MALLOC ) { diff --git a/trick_source/sim_services/MemoryManager/test/MM_stl_checkpoint.cc b/trick_source/sim_services/MemoryManager/test/MM_stl_checkpoint.cc index 8a4b4f2d..a16e5bac 100644 --- a/trick_source/sim_services/MemoryManager/test/MM_stl_checkpoint.cc +++ b/trick_source/sim_services/MemoryManager/test/MM_stl_checkpoint.cc @@ -1294,7 +1294,7 @@ TEST_F(MM_stl_checkpoint, recursive_nightmare ) { for (int i = 0; i < 5; i++) { int j = 0; - for (auto it = recursive_nightmare_copy[i].begin(); it != recursive_nightmare_copy[i].end(); it++, j++) { + for (auto it = recursive_nightmare_copy[i].begin(); it != recursive_nightmare_copy[i].end(); ++it, j++) { std::pair key = it->first; std::vector> val = it->second; diff --git a/trick_source/sim_services/Message/MessagePublisher.cpp b/trick_source/sim_services/Message/MessagePublisher.cpp index a5b491bc..d208e41a 100644 --- a/trick_source/sim_services/Message/MessagePublisher.cpp +++ b/trick_source/sim_services/Message/MessagePublisher.cpp @@ -63,7 +63,7 @@ int Trick::MessagePublisher::publish(int level , std::string message) { /** @li Go through all its subscribers and send a message update to the subscriber that is enabled. */ if ( ! subscribers.empty() ) { - for ( p = subscribers.begin() ; p != subscribers.end() ; p++ ) { + for ( p = subscribers.begin() ; p != subscribers.end() ; ++p ) { if ( (*p)->enabled ) { (*p)->update(level , header , message) ; } @@ -81,7 +81,7 @@ int Trick::MessagePublisher::publish(int level , std::string message) { Trick::MessageSubscriber * Trick::MessagePublisher::getSubscriber( std::string sub_name ) { std::list::iterator lit ; - for ( lit = subscribers.begin() ; lit != subscribers.end() ; lit++ ) { + for ( lit = subscribers.begin() ; lit != subscribers.end() ; ++lit ) { if ( ! (*lit)->name.compare(sub_name) ) { return *lit ; } diff --git a/trick_source/sim_services/RealtimeInjector/RtiExec.cpp b/trick_source/sim_services/RealtimeInjector/RtiExec.cpp index 5bf05d84..2ee9d0f6 100644 --- a/trick_source/sim_services/RealtimeInjector/RtiExec.cpp +++ b/trick_source/sim_services/RealtimeInjector/RtiExec.cpp @@ -40,7 +40,7 @@ int Trick::RtiExec::Exec () { // use trylock so we don't block if the mutex is in use. if ( pthread_mutex_trylock(&list_mutex) == 0 ) { std::vector < RtiList * >::iterator rlit ; - for ( rlit = fire_list.begin() ; rlit != fire_list.end() ; rlit++ ) { + for ( rlit = fire_list.begin() ; rlit != fire_list.end() ; ++rlit ) { (*rlit)->execute(debug) ; delete (*rlit) ; } diff --git a/trick_source/sim_services/RealtimeInjector/RtiList.cpp b/trick_source/sim_services/RealtimeInjector/RtiList.cpp index 2835f778..1adea7de 100644 --- a/trick_source/sim_services/RealtimeInjector/RtiList.cpp +++ b/trick_source/sim_services/RealtimeInjector/RtiList.cpp @@ -7,7 +7,7 @@ void Trick::RtiList::execute( bool debug ) { std::vector::iterator rebit ; - for ( rebit = event_list.begin() ; rebit != event_list.end() ; rebit++ ) { + for ( rebit = event_list.begin() ; rebit != event_list.end() ; ++rebit ) { if ( debug ) { message_publish(MSG_DEBUG, "Executing RTI: %s = %s\n", (*rebit)->ref->reference , (*rebit)->print_val().c_str() ); @@ -20,7 +20,7 @@ void Trick::RtiList::execute( bool debug ) { void Trick::RtiList::print_list() { std::vector::iterator rebit ; - for ( rebit = event_list.begin() ; rebit != event_list.end() ; rebit++ ) { + for ( rebit = event_list.begin() ; rebit != event_list.end() ; ++rebit ) { (*rebit)->print_rti() ; } } diff --git a/trick_source/sim_services/RealtimeInjector/RtiStager.cpp b/trick_source/sim_services/RealtimeInjector/RtiStager.cpp index 4f6fbae2..2e5c2bed 100644 --- a/trick_source/sim_services/RealtimeInjector/RtiStager.cpp +++ b/trick_source/sim_services/RealtimeInjector/RtiStager.cpp @@ -76,7 +76,7 @@ int Trick::RtiStager::List () { int Trick::RtiStager::SetDebug( bool on_off ) { debug = on_off ; std::vector < RtiExec * >::iterator reit ; - for ( reit = executors.begin() ; reit != executors.end() ; reit++ ) { + for ( reit = executors.begin() ; reit != executors.end() ; ++reit ) { (*reit)->SetDebug(on_off) ; } return 0 ; diff --git a/trick_source/sim_services/Sie/AttributesMap.cpp b/trick_source/sim_services/Sie/AttributesMap.cpp index 7c991677..649ce3dd 100644 --- a/trick_source/sim_services/Sie/AttributesMap.cpp +++ b/trick_source/sim_services/Sie/AttributesMap.cpp @@ -60,7 +60,7 @@ void Trick::AttributesMap::print_xml(std::ofstream & sie_out ) { std::map::iterator it ; int jj ; - for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; it++ ) { + for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; ++it ) { ATTRIBUTES * attr = (*it).second ; std::string class_name = (*it).first; std::replace(class_name.begin(), class_name.end(), ':', '_'); @@ -102,7 +102,7 @@ void Trick::AttributesMap::print_json(std::ofstream & sie_out ) { std::map::iterator it ; int jj ; sie_out << " \"classes\": [\n" ; - for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; it++ ) { + for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; ++it ) { ATTRIBUTES * attr = (*it).second ; std::string class_name = (*it).first; std::replace(class_name.begin(), class_name.end(), ':', '_'); diff --git a/trick_source/sim_services/Sie/EnumAttributesMap.cpp b/trick_source/sim_services/Sie/EnumAttributesMap.cpp index 173c2d96..59005d15 100644 --- a/trick_source/sim_services/Sie/EnumAttributesMap.cpp +++ b/trick_source/sim_services/Sie/EnumAttributesMap.cpp @@ -14,7 +14,7 @@ void Trick::EnumAttributesMap::print_xml(std::ofstream & sie_out ) { std::map::iterator it ; ENUM_ATTR * enum_attr ; - for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; it++ ) { + for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; ++it ) { enum_attr = (*it).second ; if ( enum_attr != NULL ) { @@ -35,7 +35,7 @@ void Trick::EnumAttributesMap::print_json(std::ofstream & sie_out ) { std::map::iterator it ; ENUM_ATTR * enum_attr ; sie_out << " \"enumerations\": [\n" ; - for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; it++ ) { + for ( it = name_to_attr_map.begin() ; it != name_to_attr_map.end() ; ++it ) { enum_attr = (*it).second ; if ( enum_attr != NULL ) { diff --git a/trick_source/sim_services/Sie/Sie.cpp b/trick_source/sim_services/Sie/Sie.cpp index cc7ed2b6..2239e896 100644 --- a/trick_source/sim_services/Sie/Sie.cpp +++ b/trick_source/sim_services/Sie/Sie.cpp @@ -62,7 +62,7 @@ void Trick::Sie::top_level_objects_print(std::ofstream & sie_out) { Trick::VARIABLE_MAP_ITER vit ; int jj ; - for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; vit++ ) { + for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; ++vit ) { ALLOC_INFO * alloc_info = (*vit).second ; if ( alloc_info != NULL ) { @@ -88,7 +88,7 @@ void Trick::Sie::runtime_objects_print(std::fstream & sie_out) { Trick::VARIABLE_MAP_ITER vit ; int jj ; - for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; vit++ ) { + for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; ++vit ) { ALLOC_INFO * alloc_info = (*vit).second ; if ( alloc_info != NULL && alloc_info->alloced_in_memory_init == 0) { @@ -114,7 +114,7 @@ void Trick::Sie::top_level_objects_json(std::ofstream & sie_out) { Trick::VARIABLE_MAP_ITER vit ; int jj ; sie_out << " \"top_level_objects\": [\n"; - for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; vit++ ) { + for ( vit = trick_MM->variable_map_begin() ; vit != trick_MM->variable_map_end() ; ++vit ) { ALLOC_INFO * alloc_info = (*vit).second ; if ( alloc_info != NULL ) { diff --git a/trick_source/sim_services/SimObject/SimObject.cpp b/trick_source/sim_services/SimObject/SimObject.cpp index f17dc20b..bdf92c0c 100644 --- a/trick_source/sim_services/SimObject/SimObject.cpp +++ b/trick_source/sim_services/SimObject/SimObject.cpp @@ -13,7 +13,7 @@ Trick::SimObject::~SimObject() { int Trick::SimObject::add_tag( std::string job_tag ) { std::vector ::iterator it ; - for ( it = jobs.begin() ; it != jobs.end() ; it++ ) { + for ( it = jobs.begin() ; it != jobs.end() ; ++it ) { (*it)->add_tag(job_tag) ; } return(0) ; @@ -72,7 +72,7 @@ Trick::JobData * Trick::SimObject::get_job( std::string job_name, unsigned int j std::vector ::iterator it ; // Look for the name - for ( it = jobs.begin() ; it != jobs.end() ; it++ ) { + for ( it = jobs.begin() ; it != jobs.end() ; ++it ) { if ( ! (*it)->name.compare(job_name) ) { if ( j_instance == 1 ) { return *it ; @@ -87,7 +87,7 @@ Trick::JobData * Trick::SimObject::get_job( std::string job_name, unsigned int j job_name = name + "." + job_name ; } // Look for the job with the sim object name prepended. - for ( it = jobs.begin() ; it != jobs.end() ; it++ ) { + for ( it = jobs.begin() ; it != jobs.end() ; ++it ) { if ( ! (*it)->name.compare(job_name) ) { if ( j_instance == 1 ) { return *it ; @@ -102,7 +102,7 @@ Trick::JobData * Trick::SimObject::get_job( std::string job_name, unsigned int j void Trick::SimObject::enable_all_jobs() { std::vector ::iterator it ; - for ( it = jobs.begin() ; it != jobs.end() ; it++ ) { + for ( it = jobs.begin() ; it != jobs.end() ; ++it ) { (*it)->enable() ; } } @@ -115,7 +115,7 @@ void Trick::SimObject::enable() { void Trick::SimObject::disable_all_jobs() { std::vector ::iterator it ; - for ( it = jobs.begin() ; it != jobs.end() ; it++ ) { + for ( it = jobs.begin() ; it != jobs.end() ; ++it ) { (*it)->disable() ; } } diff --git a/trick_source/sim_services/UdUnits/map_trick_units_to_udunits.cpp b/trick_source/sim_services/UdUnits/map_trick_units_to_udunits.cpp index cddfd8c5..e2aad26c 100644 --- a/trick_source/sim_services/UdUnits/map_trick_units_to_udunits.cpp +++ b/trick_source/sim_services/UdUnits/map_trick_units_to_udunits.cpp @@ -73,7 +73,7 @@ std::string map_trick_units_to_udunits( std::string orig_units ) { std::vector tokens ; std::vector::iterator it ; tokenize_units(orig_units, tokens, "*/^()") ; - for( it = tokens.begin() ; it != tokens.end() ; it++ ) { + for( it = tokens.begin() ; it != tokens.end() ; ++it ) { char last_char = *((*it).rbegin()) ; // tokens can end in powers of 2 or 3 in the old system. // save the power if it is the last character diff --git a/trick_source/sim_services/UnitTest/UnitTest.cpp b/trick_source/sim_services/UnitTest/UnitTest.cpp index 0a4961f8..edd401c1 100644 --- a/trick_source/sim_services/UnitTest/UnitTest.cpp +++ b/trick_source/sim_services/UnitTest/UnitTest.cpp @@ -47,7 +47,7 @@ int Trick::TestSuite::add_test_requirements(std::string test_case , std::string void Trick::TestSuite::delete_test_results() { std::vector ::iterator it ; - for ( it = test_results.begin() ; it != test_results.end() ; it++ ) { + for ( it = test_results.begin() ; it != test_results.end() ; ++it ) { delete (*it) ; } test_results.clear() ; @@ -63,7 +63,7 @@ Trick::UnitTest::UnitTest() { Trick::UnitTest::~UnitTest() { std::map< std::string , TestSuite >::iterator it ; - for ( it = test_suites.begin() ; it != test_suites.end() ; it++ ) { + for ( it = test_suites.begin() ; it != test_suites.end() ; ++it ) { (it->second).delete_test_results() ; } } @@ -121,7 +121,7 @@ int Trick::UnitTest::write_output() { unsigned int jj ; if ( enabled ) { - for ( it = test_suites.begin() ; it != test_suites.end() ; it++ ) { + for ( it = test_suites.begin() ; it != test_suites.end() ; ++it ) { curr_suite = &(it->second) ; num_tests += curr_suite->test_results.size() ; num_failures += curr_suite->num_failures ; @@ -133,7 +133,7 @@ int Trick::UnitTest::write_output() { out << "" << std::endl ; - for ( it = test_suites.begin() ; it != test_suites.end() ; it++ ) { + for ( it = test_suites.begin() ; it != test_suites.end() ; ++it ) { curr_suite = &(it->second) ; out << " first << "\" tests=\"" << curr_suite->test_results.size() ; out << "\" failures=\"" << num_failures << "\" disabled=\"0\" errors=\"0\" time=\"0.0\">" << std::endl ; diff --git a/trick_source/sim_services/UnitsMap/UnitsMap.cpp b/trick_source/sim_services/UnitsMap/UnitsMap.cpp index b9617956..6d6b4b49 100644 --- a/trick_source/sim_services/UnitsMap/UnitsMap.cpp +++ b/trick_source/sim_services/UnitsMap/UnitsMap.cpp @@ -21,7 +21,7 @@ Trick::UnitsMap::~UnitsMap() { std::map::iterator pit ; - for ( pit = param_units.begin() ; pit != param_units.end() ; pit++ ) { + for ( pit = param_units.begin() ; pit != param_units.end() ; ++pit ) { free((*pit).second) ; } param_units.clear() ; diff --git a/trick_source/sim_services/VariableServer/VariableServer.cpp b/trick_source/sim_services/VariableServer/VariableServer.cpp index 5507703e..7d212e92 100644 --- a/trick_source/sim_services/VariableServer/VariableServer.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer.cpp @@ -29,7 +29,7 @@ std::ostream& Trick::operator<< (std::ostream& s, Trick::VariableServer& vs) { s << "{\"variable_server_connections\":[\n"; int count = 0; int n_connections = (int)vs.var_server_threads.size(); - for ( it = vs.var_server_threads.begin() ; it != vs.var_server_threads.end() ; it++ ) { + for ( it = vs.var_server_threads.begin() ; it != vs.var_server_threads.end() ; ++it ) { s << "{\n"; s << *(*it).second; s << "}"; diff --git a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze.cpp b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze.cpp index 81a479d1..209c56f2 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze.cpp @@ -4,7 +4,7 @@ int Trick::VariableServer::copy_and_write_freeze() { pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { (*it).second->copy_and_write_freeze(exec_get_freeze_frame_count()) ; } pthread_mutex_unlock(&map_mutex) ; diff --git a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze_scheduled.cpp b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze_scheduled.cpp index 511afbd2..4c485896 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze_scheduled.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_freeze_scheduled.cpp @@ -10,7 +10,7 @@ int Trick::VariableServer::copy_and_write_freeze_scheduled() { long long next_call_tics = TRICK_MAX_LONG_LONG ; pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { VariableServerSession * session = (*it).second ; session->copy_and_write_freeze_scheduled(copy_and_write_freeze_job->next_tics) ; if ( session->get_freeze_next_tics() < next_call_tics ) { diff --git a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_scheduled.cpp b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_scheduled.cpp index 9ef7fde2..fa82104f 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_scheduled.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_scheduled.cpp @@ -10,7 +10,7 @@ int Trick::VariableServer::copy_and_write_scheduled() { long long next_call_tics = TRICK_MAX_LONG_LONG; pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { VariableServerSession * session = (*it).second ; session->copy_and_write_scheduled(copy_data_job->next_tics) ; if ( session->get_next_tics() < next_call_tics ) { diff --git a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_top.cpp b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_top.cpp index 3118098d..d2d8e222 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_top.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_copy_and_write_top.cpp @@ -4,7 +4,7 @@ int Trick::VariableServer::copy_and_write_top() { pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { (*it).second->copy_and_write_top(exec_get_frame_count()) ; } pthread_mutex_unlock(&map_mutex) ; diff --git a/trick_source/sim_services/VariableServer/VariableServer_freeze_init.cpp b/trick_source/sim_services/VariableServer/VariableServer_freeze_init.cpp index c7a81c04..818d0464 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_freeze_init.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_freeze_init.cpp @@ -12,7 +12,7 @@ int Trick::VariableServer::freeze_init() { long long next_call_tics = TRICK_MAX_LONG_LONG ; pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { VariableServerSession * session = (*it).second ; session->freeze_init() ; if ( session->get_freeze_next_tics() < next_call_tics ) { diff --git a/trick_source/sim_services/VariableServer/VariableServer_get_next_freeze_call_time.cpp b/trick_source/sim_services/VariableServer/VariableServer_get_next_freeze_call_time.cpp index f001c76f..bbb51c81 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_get_next_freeze_call_time.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_get_next_freeze_call_time.cpp @@ -9,7 +9,7 @@ int Trick::VariableServer::get_next_freeze_call_time() { long long next_call_tics = TRICK_MAX_LONG_LONG; pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { VariableServerSession * session = (*it).second ; if ( session->get_freeze_next_tics() < next_call_tics ) { next_call_tics = session->get_freeze_next_tics() ; diff --git a/trick_source/sim_services/VariableServer/VariableServer_get_next_sync_call_time.cpp b/trick_source/sim_services/VariableServer/VariableServer_get_next_sync_call_time.cpp index fd969d64..8761a4d4 100644 --- a/trick_source/sim_services/VariableServer/VariableServer_get_next_sync_call_time.cpp +++ b/trick_source/sim_services/VariableServer/VariableServer_get_next_sync_call_time.cpp @@ -9,7 +9,7 @@ int Trick::VariableServer::get_next_sync_call_time() { long long next_call_tics = TRICK_MAX_LONG_LONG ; pthread_mutex_lock(&map_mutex) ; - for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; it++ ) { + for ( auto it = var_server_sessions.begin() ; it != var_server_sessions.end() ; ++it ) { VariableServerSession * session = (*it).second ; if ( session->get_next_tics() < next_call_tics ) { next_call_tics = session->get_next_tics() ; diff --git a/trick_source/trick_swig/PrimitiveAttributesMap.cpp b/trick_source/trick_swig/PrimitiveAttributesMap.cpp index f3508d80..659f2fd6 100644 --- a/trick_source/trick_swig/PrimitiveAttributesMap.cpp +++ b/trick_source/trick_swig/PrimitiveAttributesMap.cpp @@ -27,7 +27,7 @@ Trick::PrimitiveAttributesMap::PrimitiveAttributesMap() { Trick::PrimitiveAttributesMap::~PrimitiveAttributesMap() { std::map::iterator pit ; - for ( pit = param_attr.begin() ; pit != param_attr.end() ; pit++ ) { + for ( pit = param_attr.begin() ; pit != param_attr.end() ; ++pit ) { delete(pit->second) ; } param_attr.clear() ; diff --git a/trick_source/web/CivetServer/src/VariableServerSession.cpp b/trick_source/web/CivetServer/src/VariableServerSession.cpp index 85c0ddfc..f56a8f22 100644 --- a/trick_source/web/CivetServer/src/VariableServerSession.cpp +++ b/trick_source/web/CivetServer/src/VariableServerSession.cpp @@ -60,7 +60,7 @@ void VariableServerSession::sendMessage() { ss << " \"time\" : " << std::setprecision(16) << stageTime << ",\n"; ss << " \"values\" : [\n"; - for (it = sessionVariables.begin(); it != sessionVariables.end(); it++ ) { + for (it = sessionVariables.begin(); it != sessionVariables.end(); ++it ) { if (it != sessionVariables.begin()) ss << ",\n"; (*it)->writeValue(ss); } @@ -83,7 +83,7 @@ int VariableServerSession::handleMessage(const std::string& client_msg) { std::string pycode; int period; - for (it = members.begin(); it != members.end(); it++ ) { + for (it = members.begin(); it != members.end(); ++it ) { if (strcmp((*it)->key, "cmd") == 0) { cmd = (*it)->valText; } else if (strcmp((*it)->key, "var_name") == 0) { @@ -172,7 +172,7 @@ void VariableServerSession::addVariable(char* vname){ void VariableServerSession::stageValues() { stageTime = (double)(exec_get_time_tics()) / exec_get_time_tic_value(); std::vector::iterator it; - for (it = sessionVariables.begin(); it != sessionVariables.end(); it++ ) { + for (it = sessionVariables.begin(); it != sessionVariables.end(); ++it ) { (*it)->stageValue(); } dataStaged = true; @@ -251,7 +251,7 @@ int VariableServerSession::sendUnitsMessage(const char* vname) { std::vector::iterator it; std::stringstream ss; ss << "{ \"msg_type\": \"units\", \"var_name\": \"" << vname << "\", \"data\": \""; - for (it = sessionVariables.begin(); it != sessionVariables.end(); it++ ) { + for (it = sessionVariables.begin(); it != sessionVariables.end(); ++it ) { if(!strcmp((*it)->getName(), vname)) { ss << ( (