changeset 359:f0b210403369

Merge from branch warnfix_no_size_t
author Chris Cannam
date Wed, 18 Jun 2014 13:48:33 +0100
parents d511868c1ffe (current diff) 0f72797ecdef (diff)
children bcfc21bcc973
files
diffstat 8 files changed, 42 insertions(+), 44 deletions(-) [+]
line wrap: on
line diff
--- a/.hgsubstate	Wed Jun 18 10:44:05 2014 +0100
+++ b/.hgsubstate	Wed Jun 18 13:48:33 2014 +0100
@@ -1,7 +1,7 @@
 e32a354434aa5fa7440efa17b716aacd761049fa chp
-236814e07bd07473958c1ff89103124536a0c3c8 dataquay
+d16f0fd6db6104d87882bc43788a3bb1b0f8c528 dataquay
 e637cf9160029c6d429bf89fedca157619ca8da8 pyin
 553a5f65ef64811747a6613f759622d655db63c1 sv-dependency-builds
-f5c914661f6fdc7f05c2c980b0d21350d5933428 svapp
-3efc20c59a947a137ed7fc715b2a3b0de6c02200 svcore
-584b11df8e4f3447484153ed6bc391e370856933 svgui
+a1b8b6a2cdfc6724b670118ef98ae082a8b7b750 svapp
+f960d67ce84237be28902f24d5c757a72dc8004b svcore
+b68af2be4545adf04eec58c50d8419dc574b8642 svgui
--- a/configure	Wed Jun 18 10:44:05 2014 +0100
+++ b/configure	Wed Jun 18 13:48:33 2014 +0100
@@ -1,6 +1,6 @@
 #! /bin/sh
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for Tony 0.1.
+# Generated by GNU Autoconf 2.69 for Tony 0.6.
 #
 # Report bugs to <cannam@all-day-breakfast.com>.
 #
@@ -580,8 +580,8 @@
 # Identity of this package.
 PACKAGE_NAME='Tony'
 PACKAGE_TARNAME='tony'
-PACKAGE_VERSION='0.1'
-PACKAGE_STRING='Tony 0.1'
+PACKAGE_VERSION='0.6'
+PACKAGE_STRING='Tony 0.6'
 PACKAGE_BUGREPORT='cannam@all-day-breakfast.com'
 PACKAGE_URL=''
 
@@ -1333,7 +1333,7 @@
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures Tony 0.1 to adapt to many kinds of systems.
+\`configure' configures Tony 0.6 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1394,7 +1394,7 @@
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of Tony 0.1:";;
+     short | recursive ) echo "Configuration of Tony 0.6:";;
    esac
   cat <<\_ACEOF
 
@@ -1545,7 +1545,7 @@
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-Tony configure 0.1
+Tony configure 0.6
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -1885,7 +1885,7 @@
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by Tony $as_me 0.1, which was
+It was created by Tony $as_me 0.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -4222,7 +4222,7 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-        CXXFLAGS_DEBUG="-Wall -Woverloaded-virtual -Wextra -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+        CXXFLAGS_DEBUG="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
    	CXXFLAGS_RELEASE="-g0 -O2 -Wall -pipe"
    	CXXFLAGS_MINIMAL="-g0 -O0"
 fi
@@ -7901,7 +7901,7 @@
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by Tony $as_me 0.1, which was
+This file was extended by Tony $as_me 0.6, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -7954,7 +7954,7 @@
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-Tony config.status 0.1
+Tony config.status 0.6
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
--- a/configure.ac	Wed Jun 18 10:44:05 2014 +0100
+++ b/configure.ac	Wed Jun 18 13:48:33 2014 +0100
@@ -50,7 +50,7 @@
 CXXFLAGS_MINIMAL="$AUTOCONF_CXXFLAGS"
 
 if test "x$GCC" = "xyes"; then
-        CXXFLAGS_DEBUG="-Wall -Woverloaded-virtual -Wextra -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
+        CXXFLAGS_DEBUG="-Wall -Wextra -Werror -Woverloaded-virtual -Wformat-nonliteral -Wformat-security -Winit-self -Wswitch-enum -g -pipe"
    	CXXFLAGS_RELEASE="-g0 -O2 -Wall -pipe"
    	CXXFLAGS_MINIMAL="-g0 -O0"
 fi
--- a/src/Analyser.cpp	Wed Jun 18 10:44:05 2014 +0100
+++ b/src/Analyser.cpp	Wed Jun 18 13:48:33 2014 +0100
@@ -773,13 +773,13 @@
 }
 
 void
-Analyser::getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1)
+Analyser::getEnclosingSelectionScope(int f, int &f0, int &f1)
 {
     FlexiNoteLayer *flexiNoteLayer = 
         qobject_cast<FlexiNoteLayer *>(m_layers[Notes]);
 
     int f0i = f, f1i = f;
-    size_t res = 1;
+    int res = 1;
 
     if (!flexiNoteLayer) {
         f0 = f1 = f;
--- a/src/Analyser.h	Wed Jun 18 10:44:05 2014 +0100
+++ b/src/Analyser.h	Wed Jun 18 13:48:33 2014 +0100
@@ -100,7 +100,7 @@
     float getPan(Component c) const;
     void setPan(Component c, float pan);
 
-    void getEnclosingSelectionScope(size_t f, size_t &f0, size_t &f1);
+    void getEnclosingSelectionScope(int f, int &f0, int &f1);
 
     struct FrequencyRange {
         FrequencyRange() : min(0), max(0) { }
--- a/src/MainWindow.cpp	Wed Jun 18 10:44:05 2014 +0100
+++ b/src/MainWindow.cpp	Wed Jun 18 13:48:33 2014 +0100
@@ -88,7 +88,7 @@
 using std::vector;
 
 
-MainWindow::MainWindow(bool withAudioOutput, bool withOSCSupport) :
+MainWindow::MainWindow(bool withAudioOutput) :
     MainWindowBase(withAudioOutput, false),
     m_overview(0),
     m_mainMenusCreated(false),
@@ -182,8 +182,8 @@
     // variable
     m_paneStack->setLayoutStyle(PaneStack::NoPropertyStacks);
     m_paneStack->setShowPaneAccessories(false);
-    connect(m_paneStack, SIGNAL(doubleClickSelectInvoked(size_t)),
-            this, SLOT(doubleClickSelectInvoked(size_t)));
+    connect(m_paneStack, SIGNAL(doubleClickSelectInvoked(int)),
+            this, SLOT(doubleClickSelectInvoked(int)));
     scroll->setWidget(m_paneStack);
 
     m_overview = new Overview(frame);
@@ -1241,8 +1241,6 @@
     int frame = m_viewManager->getPlaybackFrame();
     cerr << "MainWindow::moveByOneNote startframe: " << frame << endl;
     
-    Pane *p = m_analyser->getPane();
-
     bool isAtSelectionBoundary = false;
     MultiSelection::SelectionList selections = m_viewManager->getSelections();
     if (!selections.empty()) {
@@ -1345,9 +1343,6 @@
     bool haveSelection = 
         (m_viewManager &&
          !m_viewManager->getSelections().empty());
-    bool haveCurrentEditableLayer =
-        (haveCurrentLayer &&
-         currentLayer->isLayerEditable());
     bool haveCurrentTimeInstantsLayer = 
         (haveCurrentLayer &&
          qobject_cast<TimeInstantLayer *>(currentLayer));
@@ -1356,10 +1351,6 @@
          qobject_cast<TimeValueLayer *>(currentLayer));
     bool pitchCandidatesVisible = 
         m_analyser->arePitchCandidatesShown();
-    bool haveHigher =
-        m_analyser->haveHigherPitchCandidate();
-    bool haveLower =
-        m_analyser->haveLowerPitchCandidate();
 
     emit canChangePlaybackSpeed(true);
     int v = m_playSpeed->value();
@@ -2269,9 +2260,9 @@
 }
 
 void
-MainWindow::doubleClickSelectInvoked(size_t frame)
+MainWindow::doubleClickSelectInvoked(int frame)
 {
-    size_t f0, f1;
+    int f0, f1;
     m_analyser->getEnclosingSelectionScope(frame, f0, f1);
     
     cerr << "MainWindow::doubleClickSelectInvoked(" << frame << "): [" << f0 << "," << f1 << "]" << endl;
@@ -2571,7 +2562,7 @@
             (tr("Form Note from Selection"), true);
         for (MultiSelection::SelectionList::iterator k = selections.begin();
              k != selections.end(); ++k) {
-            if (!model->getNotes(k->getStartFrame(), k->getEndFrame()).empty()) {
+            if (!model->getNotesWithin(k->getStartFrame(), k->getEndFrame()).empty()) {
                 layer->splitNotesAt(m_analyser->getPane(), k->getStartFrame());
                 layer->splitNotesAt(m_analyser->getPane(), k->getEndFrame());
                 layer->mergeNotes(m_analyser->getPane(), *k, false);
@@ -2903,7 +2894,7 @@
     }
 
     bool haveSelection = false;
-    size_t startFrame = 0, endFrame = 0;
+    int startFrame = 0, endFrame = 0;
 
     if (m_viewManager && m_viewManager->haveInProgressSelection()) {
 
@@ -2961,8 +2952,9 @@
 }
 
 void
-MainWindow::sampleRateMismatch(size_t requested, size_t actual,
-                               bool willResample)
+MainWindow::sampleRateMismatch(int /* requested */,
+                               int /* actual */,
+                               bool /* willResample */)
 {
     updateDescriptionLabel();
 }
@@ -3132,7 +3124,7 @@
 }
 
 void
-MainWindow::modelGenerationWarning(QString transformName, QString message)
+MainWindow::modelGenerationWarning(QString /* transformName */, QString message)
 {
     QMessageBox::warning
         (this, tr("Warning"), message, QMessageBox::Ok);
@@ -3162,7 +3154,8 @@
 
 void
 MainWindow::modelRegenerationWarning(QString layerName,
-                                     QString transformName, QString message)
+                                     QString /* transformName */,
+                                     QString message)
 {
     QMessageBox::warning
         (this, tr("Warning"), tr("<b>Warning when regenerating layer</b><p>When regenerating the derived layer \"%1\" using new data model as input:<p>%2").arg(layerName).arg(message), QMessageBox::Ok);
@@ -3188,7 +3181,7 @@
 }
 
 void
-MainWindow::handleOSCMessage(const OSCMessage &message)
+MainWindow::handleOSCMessage(const OSCMessage &)
 {
     cerr << "MainWindow::handleOSCMessage: Not implemented" << endl;
 }
--- a/src/MainWindow.h	Wed Jun 18 10:44:05 2014 +0100
+++ b/src/MainWindow.h	Wed Jun 18 13:48:33 2014 +0100
@@ -27,8 +27,7 @@
     Q_OBJECT
 
 public:
-    MainWindow(bool withAudioOutput = true,
-               bool withOSCSupport = true);
+    MainWindow(bool withAudioOutput = true);
     virtual ~MainWindow();
 
 signals:
@@ -86,7 +85,7 @@
     virtual void precisionAnalysisToggled();
     virtual void lowampAnalysisToggled();
 
-    virtual void doubleClickSelectInvoked(size_t);
+    virtual void doubleClickSelectInvoked(int);
     virtual void abandonSelection();
 
     virtual void paneAdded(Pane *);
@@ -134,7 +133,7 @@
     virtual void decreaseNotesPan();
     virtual void restoreNormalNotesPan();
 
-    virtual void sampleRateMismatch(size_t, size_t, bool);
+    virtual void sampleRateMismatch(int, int, bool);
     virtual void audioOverloadPluginDisabled();
     virtual void audioTimeStretchMultiChannelDisabled();
 
--- a/src/main.cpp	Wed Jun 18 10:44:05 2014 +0100
+++ b/src/main.cpp	Wed Jun 18 13:48:33 2014 +0100
@@ -100,6 +100,12 @@
     QStringList m_filepathQueue;
 
     virtual bool event(QEvent *event) {
+
+// Avoid warnings/errors with -Wextra because we aren't explicitly
+// handling all event types (-Wall is OK with this because of the
+// default but the stricter level insists)
+#pragma GCC diagnostic ignored "-Wswitch-enum"
+
         switch (event->type()) {
         case QEvent::FileOpen:
         {
@@ -198,7 +204,7 @@
     qRegisterMetaType<size_t>("size_t");
     qRegisterMetaType<PropertyContainer::PropertyName>("PropertyContainer::PropertyName");
 
-    MainWindow *gui = new MainWindow(audioOutput, false); // no osc support
+    MainWindow *gui = new MainWindow(audioOutput);
     application.setMainWindow(gui);
     if (splash) {
         QObject::connect(gui, SIGNAL(hideSplash()), splash, SLOT(hide()));