[Summary] Just adding comment for better code-maintaining.
[ardour.git] / libs / ardour / session_state.cc
index eca01cbe9995313436d7cdf069217503fb87c3c0..891c37e04cecac8532938c3c16ac2571dfa5c375 100644 (file)
@@ -1101,6 +1101,7 @@ Session::state (bool full_state)
                XMLNode& locations_state = loc.get_state();
                
                if (ARDOUR::Profile->get_trx() && _locations) {
+                       // For tracks we need stored the Auto Loop Range and all MIDI markers.
                        for (Locations::LocationList::const_iterator i = _locations->list ().begin (); i != _locations->list ().end (); ++i) {
                                if ((*i)->is_mark () || (*i)->is_auto_loop ()) {
                                        locations_state.add_child_nocopy ((*i)->get_state ());
@@ -1908,17 +1909,15 @@ Session::get_sources_as_xml ()
 void
 Session::reset_write_sources (bool mark_write_complete, bool force)
 {
-    boost::shared_ptr<RouteList> rl = routes.reader();
-    for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
-        boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
-        if (tr) {
-                       
-                       // block state saving
+       boost::shared_ptr<RouteList> rl = routes.reader();
+       for (RouteList::iterator i = rl->begin(); i != rl->end(); ++i) {
+               boost::shared_ptr<Track> tr = boost::dynamic_pointer_cast<Track> (*i);
+               if (tr) {
                        _state_of_the_state = StateOfTheState (_state_of_the_state|InCleanup);
                        tr->reset_write_sources(mark_write_complete, force);
                        _state_of_the_state = StateOfTheState (_state_of_the_state & ~InCleanup);
-        }
-    }
+               }
+       }
 }
 
 int