diff view/ViewManager.cpp @ 806:4c8ca536b54f warnfix_no_size_t

Some more unsigned/long removal
author Chris Cannam
date Tue, 17 Jun 2014 15:36:56 +0100
parents b75c95e7f906
children 40c6c9344ff6
line wrap: on
line diff
--- a/view/ViewManager.cpp	Tue Jun 17 15:18:06 2014 +0100
+++ b/view/ViewManager.cpp	Tue Jun 17 15:36:56 2014 +0100
@@ -125,7 +125,7 @@
 {
 }
 
-unsigned long
+int
 ViewManager::getGlobalCentreFrame() const
 {
 #ifdef DEBUG_VIEW_MANAGER
@@ -135,7 +135,7 @@
 }
 
 void
-ViewManager::setGlobalCentreFrame(unsigned long f)
+ViewManager::setGlobalCentreFrame(int f)
 {
 #ifdef DEBUG_VIEW_MANAGER
     cerr << "ViewManager::setGlobalCentreFrame to " << f << endl;
@@ -144,7 +144,7 @@
     emit globalCentreFrameChanged(f);
 }
 
-unsigned long
+int
 ViewManager::getGlobalZoom() const
 {
 #ifdef DEBUG_VIEW_MANAGER
@@ -153,7 +153,7 @@
     return m_globalZoom;
 }
 
-unsigned long
+int
 ViewManager::getPlaybackFrame() const
 {
     if (m_playSource && m_playSource->isPlaying()) {
@@ -163,7 +163,7 @@
 }
 
 void
-ViewManager::setPlaybackFrame(unsigned long f)
+ViewManager::setPlaybackFrame(int f)
 {
     if (m_playbackFrame != f) {
 	m_playbackFrame = f;
@@ -186,15 +186,15 @@
     m_playbackModel = model;
 }
 
-size_t
-ViewManager::alignPlaybackFrameToReference(size_t frame) const
+int
+ViewManager::alignPlaybackFrameToReference(int frame) const
 {
     if (!m_playbackModel) return frame;
     else return m_playbackModel->alignToReference(frame);
 }
 
-size_t
-ViewManager::alignReferenceToPlaybackFrame(size_t frame) const
+int
+ViewManager::alignReferenceToPlaybackFrame(int frame) const
 {
     if (!m_playbackModel) return frame;
     else return m_playbackModel->alignFromReference(frame);
@@ -292,8 +292,8 @@
     }
 }
 
-size_t
-ViewManager::constrainFrameToSelection(size_t frame) const
+int
+ViewManager::constrainFrameToSelection(int frame) const
 {
     MultiSelection::SelectionList sl = getSelections();
     if (sl.empty()) return frame;
@@ -352,7 +352,7 @@
 }
 
 Selection
-ViewManager::getContainingSelection(size_t frame, bool defaultToFollowing) const
+ViewManager::getContainingSelection(int frame, bool defaultToFollowing) const
 {
     return m_selections.getContainingSelection(frame, defaultToFollowing);
 }
@@ -457,7 +457,7 @@
     }
 }
 
-size_t 
+int 
 ViewManager::getPlaybackSampleRate() const
 {
     if (m_playSource) {
@@ -466,7 +466,7 @@
     return 0;
 }
 
-size_t
+int
 ViewManager::getOutputSampleRate() const
 {
     if (m_playSource) {
@@ -538,7 +538,7 @@
 }
 
 void
-ViewManager::viewCentreFrameChanged(unsigned long f, bool locked,
+ViewManager::viewCentreFrameChanged(int f, bool locked,
                                     PlaybackFollowMode mode)
 {
     View *v = dynamic_cast<View *>(sender());
@@ -570,15 +570,15 @@
 }
 
 void
-ViewManager::seek(unsigned long f)
+ViewManager::seek(int f)
 {
 #ifdef DEBUG_VIEW_MANAGER 
     cerr << "ViewManager::seek(" << f << ")" << endl;
 #endif
 
     if (m_playSource && m_playSource->isPlaying()) {
-	unsigned long playFrame = m_playSource->getCurrentPlayingFrame();
-	unsigned long diff = std::max(f, playFrame) - std::min(f, playFrame);
+	int playFrame = m_playSource->getCurrentPlayingFrame();
+	int diff = std::max(f, playFrame) - std::min(f, playFrame);
 	if (diff > 20000) {
 	    m_playbackFrame = f;
 	    m_playSource->play(f);
@@ -596,7 +596,7 @@
 }
 
 void
-ViewManager::viewZoomLevelChanged(unsigned long z, bool locked)
+ViewManager::viewZoomLevelChanged(int z, bool locked)
 {
     View *v = dynamic_cast<View *>(sender());