@@ -57,13 +57,13 @@ bool DeleteMap::Redo(void)
5757    return  true ;
5858}
5959
60- QString DeleteMap::GetUndoMessage (void )
60+ QString DeleteMap::GetUndoMessage (void )  const 
6161{
6262    return  (HasUndo () ? m_undoStack[m_undoStackPointer].message  :
6363            QObject::tr (" (Nothing to undo)"  ));
6464}
6565
66- QString DeleteMap::GetRedoMessage (void )
66+ QString DeleteMap::GetRedoMessage (void )  const 
6767{
6868    return  (HasRedo () ? m_undoStack[m_undoStackPointer + 1 ].message  :
6969            QObject::tr (" (Nothing to redo)"  ));
@@ -192,7 +192,7 @@ void DeleteMap::SetFileEditing(PlayerContext *ctx, bool edit)
192192}
193193
194194// / Determines whether the file is currently in edit mode.
195- bool  DeleteMap::IsFileEditing (PlayerContext *ctx)
195+ bool  DeleteMap::IsFileEditing (const   PlayerContext *ctx)
196196{
197197    bool  result = false ;
198198    if  (ctx)
@@ -205,7 +205,7 @@ bool DeleteMap::IsFileEditing(PlayerContext *ctx)
205205    return  result;
206206}
207207
208- bool  DeleteMap::IsEmpty (void )
208+ bool  DeleteMap::IsEmpty (void )  const 
209209{
210210    return  m_deleteMap.empty ();
211211}
@@ -512,12 +512,12 @@ MarkTypes DeleteMap::Delete(uint64_t frame)
512512 * \brief Returns true if the given frame is deemed to be within a region 
513513 *        that should be cut. 
514514 */  
515- bool  DeleteMap::IsInDelete (uint64_t  frame)
515+ bool  DeleteMap::IsInDelete (uint64_t  frame)  const 
516516{
517517    if  (m_deleteMap.isEmpty ())
518518        return  false ;
519519
520-     frm_dir_map_t ::Iterator  it = m_deleteMap.find (frame);
520+     frm_dir_map_t ::const_iterator  it = m_deleteMap.find (frame);
521521    if  (it != m_deleteMap.end ())
522522        return  true ;
523523
@@ -539,23 +539,24 @@ bool DeleteMap::IsInDelete(uint64_t frame)
539539/* *
540540 * \brief Returns true if the given frame is a temporary/placeholder mark 
541541 */  
542- bool  DeleteMap::IsTemporaryMark (uint64_t  frame)
542+ bool  DeleteMap::IsTemporaryMark (uint64_t  frame)  const 
543543{
544544    if  (m_deleteMap.isEmpty ())
545545        return  false ;
546546
547-     frm_dir_map_t ::Iterator  it = m_deleteMap.find (frame);
547+     frm_dir_map_t ::const_iterator  it = m_deleteMap.find (frame);
548548    return  (it != m_deleteMap.end ()) && (MARK_PLACEHOLDER == it.value ());
549549}
550550
551551/* *
552552 * \brief Returns the next or previous mark. If these do not exist, returns 
553553 *        either zero (the first frame) or total (the last frame). 
554554 */  
555- uint64_t  DeleteMap::GetNearestMark (uint64_t  frame, uint64_t  total, bool  right)
555+ uint64_t  DeleteMap::GetNearestMark (
556+     uint64_t  frame, uint64_t  total, bool  right) const 
556557{
557558    uint64_t  result;
558-     frm_dir_map_t ::Iterator  it = m_deleteMap.begin ();
559+     frm_dir_map_t ::const_iterator  it = m_deleteMap.begin ();
559560    if  (right)
560561    {
561562        result = total;
@@ -579,11 +580,11 @@ uint64_t DeleteMap::GetNearestMark(uint64_t frame, uint64_t total, bool right)
579580/* *
580581 * \brief Returns true if a temporary placeholder mark is defined. 
581582 */  
582- bool  DeleteMap::HasTemporaryMark (void )
583+ bool  DeleteMap::HasTemporaryMark (void )  const 
583584{
584585    if  (!m_deleteMap.isEmpty ())
585586    {
586-         frm_dir_map_t ::Iterator  it = m_deleteMap.begin ();
587+         frm_dir_map_t ::const_iterator  it = m_deleteMap.begin ();
587588        for  ( ; it != m_deleteMap.end (); ++it)
588589            if  (MARK_PLACEHOLDER == it.value ())
589590                return  true ;
@@ -667,7 +668,8 @@ void DeleteMap::LoadCommBreakMap(uint64_t total, frm_dir_map_t &map)
667668}
668669
669670// / Loads the delete map from the database.
670- void  DeleteMap::LoadMap (uint64_t  total, PlayerContext *ctx, QString undoMessage)
671+ void  DeleteMap::LoadMap (
672+     uint64_t  total, const  PlayerContext *ctx, QString undoMessage)
671673{
672674    if  (!ctx || !ctx->playingInfo  || gCoreContext ->IsDatabaseIgnored ())
673675        return ;
@@ -683,7 +685,7 @@ void DeleteMap::LoadMap(uint64_t total, PlayerContext *ctx, QString undoMessage)
683685
684686// / Returns true if an auto-save map was loaded.
685687// / Does nothing and returns false if not.
686- bool  DeleteMap::LoadAutoSaveMap (uint64_t  total, PlayerContext *ctx)
688+ bool  DeleteMap::LoadAutoSaveMap (uint64_t  total, const   PlayerContext *ctx)
687689{
688690    if  (!ctx || !ctx->playingInfo  || gCoreContext ->IsDatabaseIgnored ())
689691        return  false ;
@@ -780,13 +782,13 @@ bool DeleteMap::TrackerWantsToJump(uint64_t frame, uint64_t total, uint64_t &to)
780782 * \brief Returns the number of the last frame in the video that is not in a 
781783 *        cut sequence. 
782784 */  
783- uint64_t  DeleteMap::GetLastFrame (uint64_t  total)
785+ uint64_t  DeleteMap::GetLastFrame (uint64_t  total)  const 
784786{
785787    uint64_t  result = total;
786788    if  (IsEmpty ())
787789        return  result;
788790
789-     frm_dir_map_t ::Iterator  it = m_deleteMap.end ();
791+     frm_dir_map_t ::const_iterator  it = m_deleteMap.end ();
790792    --it;
791793
792794    if  (it.value () == MARK_CUT_START)
@@ -797,7 +799,7 @@ uint64_t DeleteMap::GetLastFrame(uint64_t total)
797799/* *
798800 * \brief Compares the current cut list with the saved cut list 
799801 */  
800- bool  DeleteMap::IsSaved (PlayerContext *ctx)
802+ bool  DeleteMap::IsSaved (const   PlayerContext *ctx)  const 
801803{
802804    if  (!ctx || !ctx->playingInfo  || gCoreContext ->IsDatabaseIgnored ())
803805        return  true ;
0 commit comments