diff options
author | mio <[email protected]> | 2024-09-29 19:20:32 +1000 |
---|---|---|
committer | Michele Calgaro <[email protected]> | 2024-09-30 21:59:48 +0900 |
commit | 0dbeeeb9f20945e8edfd2d049a260283a84a8d75 (patch) | |
tree | 6e8c72ac03df7fb9b12da5276bb77f9c4e9c96f1 /src | |
parent | f41da351c6fa85a36a29611edc98cf74834b43af (diff) | |
download | codeine-0dbeeeb9f20945e8edfd2d049a260283a84a8d75.tar.gz codeine-0dbeeeb9f20945e8edfd2d049a260283a84a8d75.zip |
Address -Wall warnings
VideoWindow::ExposeEvent wasn't being used correctly; it should be a
TQCustomEvent (although, the 3000 type is already being used for
forwarding XINE_PROGRESS_EVENT).
While the pts_per_smpls part never seemed to be encountered, it would
have resulted in a floating point exception as it's always 0. Commented
out to leave a hint as to what the code should be doing.
Resolves: TDE/codeine#2
Signed-off-by: mio <[email protected]>
(cherry picked from commit 9ef39acd5d211e5a8164bfb4a075e2e0cd6f9bee)
Diffstat (limited to 'src')
-rw-r--r-- | src/app/fht.cpp | 4 | ||||
-rw-r--r-- | src/app/mainWindow.cpp | 18 | ||||
-rw-r--r-- | src/app/stateChange.cpp | 6 | ||||
-rw-r--r-- | src/app/videoWindow.cpp | 5 | ||||
-rw-r--r-- | src/app/xineEngine.cpp | 4 | ||||
-rw-r--r-- | src/app/xineEngine.h | 2 |
6 files changed, 22 insertions, 17 deletions
diff --git a/src/app/fht.cpp b/src/app/fht.cpp index f678bee..3a82ede 100644 --- a/src/app/fht.cpp +++ b/src/app/fht.cpp @@ -175,8 +175,8 @@ void FHT::power2(float *p) *p = (*p * *p), *p += *p, p++; - for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q) - *p++ = (*p * *p) + (*q * *q); + for (i = 1, q = p + m_num - 2; i < (m_num / 2); i++, --q, p++) + *p = (*p * *p) + (*q * *q); } diff --git a/src/app/mainWindow.cpp b/src/app/mainWindow.cpp index 8e01fd5..159d84c 100644 --- a/src/app/mainWindow.cpp +++ b/src/app/mainWindow.cpp @@ -706,13 +706,19 @@ action( const char *name ) TDEActionCollection *actionCollection = nullptr; TDEAction *action = nullptr; - if( mainWindow = (MainWindow*)kapp->mainWidget() ) - if( actionCollection = mainWindow->actionCollection() ) - action = actionCollection->action( name ); + mainWindow = dynamic_cast<MainWindow *>(kapp->mainWidget()); + if (mainWindow) + { + actionCollection = mainWindow->actionCollection(); + if (actionCollection) + { + action = actionCollection->action(name); + } + } - Q_ASSERT( mainWindow ); - Q_ASSERT( actionCollection ); - Q_ASSERT( action ); + Q_ASSERT(mainWindow); + Q_ASSERT(actionCollection); + Q_ASSERT(action); return action; } diff --git a/src/app/stateChange.cpp b/src/app/stateChange.cpp index e0450d3..efa9389 100644 --- a/src/app/stateChange.cpp +++ b/src/app/stateChange.cpp @@ -120,6 +120,8 @@ MainWindow::engineStateChanged( Engine::State state ) case Engine::Paused: m_positionSlider->setEnabled( TheStream::canSeek() ); break; + default: + break; } @@ -160,6 +162,8 @@ MainWindow::engineStateChanged( Engine::State state ) case Engine::TrackEnded: m_titleLabel->setText( TheStream::prettyTitle() ); break; + default: + break; } @@ -187,6 +191,8 @@ MainWindow::engineStateChanged( Engine::State state ) case Engine::Playing: toolBar()->hide(); break; + default: + break; } } } diff --git a/src/app/videoWindow.cpp b/src/app/videoWindow.cpp index b005206..0688112 100644 --- a/src/app/videoWindow.cpp +++ b/src/app/videoWindow.cpp @@ -226,11 +226,6 @@ VideoWindow::event( TQEvent *e ) stop(); return false; - case VideoWindow::ExposeEvent: - //see VideoWindow::x11Event() - - return true; - // Xlib.h sucks fucking balls!!!!11!!1! #undef KeyPress case TQEvent::KeyPress: { diff --git a/src/app/xineEngine.cpp b/src/app/xineEngine.cpp index 6132f4a..e38ff4e 100644 --- a/src/app/xineEngine.cpp +++ b/src/app/xineEngine.cpp @@ -615,7 +615,7 @@ VideoWindow::scope() //prune the buffer list and update the m_current_vpts timestamp timerEvent( nullptr ); - const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope ); + // const int64_t pts_per_smpls = 0; //scope_plugin_pts_per_smpls( m_scope ); for( int channels = xine_get_stream_info( m_stream, XINE_STREAM_INFO_AUDIO_CHANNELS ), frame = 0; frame < SCOPE_SIZE; ) { MyNode *best_node = nullptr; @@ -631,7 +631,7 @@ VideoWindow::scope() diff = m_current_vpts; diff -= best_node->vpts; diff *= 1<<16; - diff /= pts_per_smpls; + // diff /= pts_per_smpls; const int16_t* data16 = best_node->mem; diff --git a/src/app/xineEngine.h b/src/app/xineEngine.h index d152a96..638bc01 100644 --- a/src/app/xineEngine.h +++ b/src/app/xineEngine.h @@ -136,8 +136,6 @@ namespace Codeine void becomePreferredSize(); TQImage captureFrame() const; - enum { ExposeEvent = 3000 }; - public slots: void resetZoom(); |