changeset 1586:841b2a3e606d

Merge from branch fix-static-analysis
author Chris Cannam
date Wed, 09 Jan 2019 15:24:38 +0000
parents 9570ef94eaa3 (current diff) 70e172e6cc59 (diff)
children ce185d4dd408 d83ab62cdc28
files
diffstat 146 files changed, 943 insertions(+), 945 deletions(-) [+]
line wrap: on
line diff
--- a/base/AudioLevel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/AudioLevel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _AUDIO_LEVEL_H_
-#define _AUDIO_LEVEL_H_
+#ifndef SV_AUDIO_LEVEL_H
+#define SV_AUDIO_LEVEL_H
 
 /**
  * AudioLevel converts audio sample levels between various scales:
--- a/base/Clipboard.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Clipboard.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _CLIPBOARD_H_
-#define _CLIPBOARD_H_
+#ifndef SV_CLIPBOARD_H
+#define SV_CLIPBOARD_H
 
 #include <QString>
 #include <vector>
--- a/base/Command.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Command.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _COMMAND_H_
-#define _COMMAND_H_
+#ifndef SV_COMMAND_H
+#define SV_COMMAND_H
 
 #include <QObject>
 #include <QString>
@@ -42,10 +42,10 @@
     virtual void deleteCommand(Command *command);
     virtual bool haveCommands() const;
 
-    virtual void execute();
-    virtual void unexecute();
+    void execute() override;
+    void unexecute() override;
 
-    virtual QString getName() const;
+    QString getName() const override;
     virtual void setName(QString name);
 
 protected:
@@ -66,7 +66,7 @@
     BundleCommand(QString name);
     virtual ~BundleCommand();
 
-    virtual QString getName() const;
+    QString getName() const override;
 };
 
 #endif
--- a/base/Debug.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Debug.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -24,8 +24,8 @@
 
 #include <stdexcept>
 
-static SVDebug *svdebug = 0;
-static SVCerr *svcerr = 0;
+static SVDebug *svdebug = nullptr;
+static SVCerr *svcerr = nullptr;
 static QMutex mutex;
 
 SVDebug &getSVDebug() {
@@ -53,7 +53,7 @@
 bool SVCerr::m_silenced = false;
 
 SVDebug::SVDebug() :
-    m_prefix(0),
+    m_prefix(nullptr),
     m_ok(false),
     m_eol(true)
 {
--- a/base/Exceptions.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Exceptions.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _EXCEPTIONS_H_
-#define _EXCEPTIONS_H_
+#ifndef SV_EXCEPTIONS_H
+#define SV_EXCEPTIONS_H
 
 #include <exception>
 
@@ -27,7 +27,7 @@
 public:
     FileNotFound(QString file) throw();
     virtual ~FileNotFound() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
     
 protected:
     QString m_file;
@@ -38,7 +38,7 @@
 public:
     FailedToOpenFile(QString file) throw();
     virtual ~FailedToOpenFile() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
     
 protected:
     QString m_file;
@@ -49,7 +49,7 @@
 public:
     DirectoryCreationFailed(QString directory) throw();
     virtual ~DirectoryCreationFailed() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
     
 protected:
     QString m_directory;
@@ -60,7 +60,7 @@
 public:
     FileReadFailed(QString file) throw();
     virtual ~FileReadFailed() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
 
 protected:
     QString m_file;
@@ -71,7 +71,7 @@
 public:
     FileOperationFailed(QString file, QString operation) throw();
     virtual ~FileOperationFailed() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
 
 protected:
     QString m_file;
@@ -85,7 +85,7 @@
                           size_t required, size_t available) throw();
     InsufficientDiscSpace(QString directory) throw();
     virtual ~InsufficientDiscSpace() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
 
     QString getDirectory() const { return m_directory; }
     size_t getRequired() const { return m_required; }
@@ -102,7 +102,7 @@
 public:
     AllocationFailed(QString purpose) throw();
     virtual ~AllocationFailed() throw() { }
-    virtual const char *what() const throw();
+    const char *what() const throw() override;
 
 protected:
     QString m_purpose;
--- a/base/FrameTimer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/FrameTimer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FRAME_TIMER_H_
-#define _FRAME_TIMER_H_
+#ifndef SV_FRAME_TIMER_H
+#define SV_FRAME_TIMER_H
 
 #include "BaseTypes.h"
 
--- a/base/LogRange.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/LogRange.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LOG_RANGE_H_
-#define _LOG_RANGE_H_
+#ifndef SV_LOG_RANGE_H
+#define SV_LOG_RANGE_H
 
 #include <vector>
 #include "Debug.h"
--- a/base/Pitch.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Pitch.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PITCH_H_
-#define _PITCH_H_
+#ifndef SV_PITCH_H
+#define SV_PITCH_H
 
 #include <QString>
 
--- a/base/PlayParameterRepository.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/PlayParameterRepository.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -92,7 +92,7 @@
 PlayParameters *
 PlayParameterRepository::getPlayParameters(const Playable *playable) 
 {
-    if (m_playParameters.find(playable) == m_playParameters.end()) return 0;
+    if (m_playParameters.find(playable) == m_playParameters.end()) return nullptr;
     return m_playParameters.find(playable)->second;
 }
 
--- a/base/PlayParameterRepository.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/PlayParameterRepository.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLAY_PARAMETER_REPOSITORY_H_
-#define _PLAY_PARAMETER_REPOSITORY_H_
+#ifndef SV_PLAY_PARAMETER_REPOSITORY_H
+#define SV_PLAY_PARAMETER_REPOSITORY_H
 
 #include "PlayParameters.h"
 #include "Command.h"
@@ -52,9 +52,9 @@
         void setPlayPan(float);
         void setPlayGain(float);
         void setPlayClipId(QString);
-        void execute();
-        void unexecute();
-        QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         PlayParameters *m_params;
--- a/base/PlayParameters.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/PlayParameters.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLAY_PARAMETERS_H_
-#define _PLAY_PARAMETERS_H_
+#ifndef SV_PLAY_PARAMETERS_H
+#define SV_PLAY_PARAMETERS_H
 
 #include <QObject>
 
@@ -36,9 +36,9 @@
 
     virtual void copyFrom(const PlayParameters *);
 
-    virtual void toXml(QTextStream &stream,
+    void toXml(QTextStream &stream,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 public slots:
     virtual void setPlayMuted(bool muted);
--- a/base/Playable.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Playable.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLAYABLE_H_
-#define _PLAYABLE_H_
+#ifndef SV_PLAYABLE_H
+#define SV_PLAYABLE_H
 
 #include <QString>
 
--- a/base/Preferences.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Preferences.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -25,7 +25,7 @@
 #include <QSettings>
 
 Preferences *
-Preferences::m_instance = 0;
+Preferences::m_instance = nullptr;
 
 Preferences *
 Preferences::getInstance()
--- a/base/Preferences.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Preferences.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PREFERENCES_H_
-#define _PREFERENCES_H_
+#ifndef SV_PREFERENCES_H
+#define SV_PREFERENCES_H
 
 #include "PropertyContainer.h"
 
@@ -27,13 +27,13 @@
 public:
     static Preferences *getInstance();
 
-    virtual PropertyList getProperties() const;
-    virtual QString getPropertyLabel(const PropertyName &) const;
-    virtual PropertyType getPropertyType(const PropertyName &) const;
-    virtual int getPropertyRangeAndValue(const PropertyName &, int *, int *, int *) const;
-    virtual QString getPropertyValueLabel(const PropertyName &, int value) const;
-    virtual QString getPropertyContainerName() const;
-    virtual QString getPropertyContainerIconName() const;
+    PropertyList getProperties() const override;
+    QString getPropertyLabel(const PropertyName &) const override;
+    PropertyType getPropertyType(const PropertyName &) const override;
+    int getPropertyRangeAndValue(const PropertyName &, int *, int *, int *) const override;
+    QString getPropertyValueLabel(const PropertyName &, int value) const override;
+    QString getPropertyContainerName() const override;
+    QString getPropertyContainerIconName() const override;
 
     enum SpectrogramSmoothing {
         NoSpectrogramSmoothing,
@@ -108,7 +108,7 @@
     bool getShowSplash() const { return m_showSplash; }
 
 public slots:
-    virtual void setProperty(const PropertyName &, int);
+    void setProperty(const PropertyName &, int) override;
 
     void setSpectrogramSmoothing(SpectrogramSmoothing smoothing);
     void setSpectrogramXSmoothing(SpectrogramXSmoothing smoothing);
--- a/base/Profiler.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Profiler.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -29,7 +29,7 @@
 #include <set>
 #include <map>
 
-Profiles* Profiles::m_instance = 0;
+Profiles* Profiles::m_instance = nullptr;
 
 Profiles* Profiles::getInstance()
 {
--- a/base/Profiler.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Profiler.h	Wed Jan 09 15:24:38 2019 +0000
@@ -20,8 +20,8 @@
 */
 
 
-#ifndef _PROFILER_H_
-#define _PROFILER_H_
+#ifndef SV_PROFILER_H
+#define SV_PROFILER_H
 
 #include "system/System.h"
 
--- a/base/ProgressPrinter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/ProgressPrinter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PROGRESS_PRINTER_H_
-#define _PROGRESS_PRINTER_H_
+#ifndef SV_PROGRESS_PRINTER_H
+#define SV_PROGRESS_PRINTER_H
 
 #include "ProgressReporter.h"
 
@@ -26,14 +26,14 @@
     ProgressPrinter(QString message, QObject *parent = 0);
     virtual ~ProgressPrinter();
     
-    virtual bool isDefinite() const;
-    virtual void setDefinite(bool definite);
+    bool isDefinite() const override;
+    void setDefinite(bool definite) override;
 
-    virtual bool wasCancelled() const { return false; } // no mechanism
+    bool wasCancelled() const override { return false; } // no mechanism
 
 public slots:
-    virtual void setMessage(QString);
-    virtual void setProgress(int);
+    void setMessage(QString) override;
+    void setProgress(int) override;
     virtual void done();
 
 protected:
--- a/base/PropertyContainer.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/PropertyContainer.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -68,7 +68,7 @@
 RangeMapper *
 PropertyContainer::getNewPropertyRangeMapper(const PropertyName &) const
 {
-    return 0;
+    return nullptr;
 }
 
 void
@@ -80,8 +80,8 @@
 Command *
 PropertyContainer::getSetPropertyCommand(const PropertyName &name, int value)
 {
-    int currentValue = getPropertyRangeAndValue(name, 0, 0, 0);
-    if (value == currentValue) return 0;
+    int currentValue = getPropertyRangeAndValue(name, nullptr, nullptr, nullptr);
+    if (value == currentValue) return nullptr;
     return new SetPropertyCommand(this, name, value);
 }
  
@@ -110,7 +110,7 @@
                   << nameString << "\", \""
                   << valueString
                   << "\"): Name and value conversion failed" << endl;
-        return 0;
+        return nullptr;
     }
     return getSetPropertyCommand(name, value);
 }
@@ -181,7 +181,7 @@
     case ColourMapProperty:
     {
         int min, max;
-        getPropertyRangeAndValue(name, &min, &max, 0);
+        getPropertyRangeAndValue(name, &min, &max, nullptr);
         for (int i = min; i <= max; ++i) {
             if (valueString == getPropertyValueLabel(name, i)) {
                 value = i;
@@ -206,7 +206,7 @@
     if (success) return true;
 
     int min, max;
-    getPropertyRangeAndValue(name, &min, &max, 0);
+    getPropertyRangeAndValue(name, &min, &max, nullptr);
     
     bool ok = false;
     int i = valueString.toInt(&ok);
@@ -235,7 +235,7 @@
 void
 PropertyContainer::SetPropertyCommand::execute()
 {
-    m_oldValue = m_pc->getPropertyRangeAndValue(m_pn, 0, 0, 0);
+    m_oldValue = m_pc->getPropertyRangeAndValue(m_pn, nullptr, nullptr, nullptr);
     m_pc->setProperty(m_pn, m_value);
 }
 
--- a/base/PropertyContainer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/PropertyContainer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -162,9 +162,9 @@
         SetPropertyCommand(PropertyContainer *pc, const PropertyName &pn, int);
         virtual ~SetPropertyCommand() { }
 
-        virtual void execute();
-        virtual void unexecute();
-        virtual QString getName() const;
+        void execute() override;
+        void unexecute() override;
+        QString getName() const override;
 
     protected:
         PropertyContainer *m_pc;
--- a/base/RangeMapper.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/RangeMapper.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RANGE_MAPPER_H_
-#define _RANGE_MAPPER_H_
+#ifndef SV_RANGE_MAPPER_H
+#define SV_RANGE_MAPPER_H
 
 #include <QString>
 
@@ -89,14 +89,14 @@
                       QString unit = "", bool inverted = false,
                       std::map<int, QString> labels = {});
     
-    virtual int getPositionForValue(double value) const;
-    virtual int getPositionForValueUnclamped(double value) const;
+    int getPositionForValue(double value) const override;
+    int getPositionForValueUnclamped(double value) const override;
 
-    virtual double getValueForPosition(int position) const;
-    virtual double getValueForPositionUnclamped(int position) const;
+    double getValueForPosition(int position) const override;
+    double getValueForPositionUnclamped(int position) const override;
 
-    virtual QString getUnit() const { return m_unit; }
-    virtual QString getLabel(int position) const;
+    QString getUnit() const override { return m_unit; }
+    QString getLabel(int position) const override;
 
 protected:
     int m_minpos;
@@ -131,13 +131,13 @@
                               double minval, double maxval,
                               double &minlog, double &ratio);
 
-    virtual int getPositionForValue(double value) const;
-    virtual int getPositionForValueUnclamped(double value) const;
+    int getPositionForValue(double value) const override;
+    int getPositionForValueUnclamped(double value) const override;
 
-    virtual double getValueForPosition(int position) const;
-    virtual double getValueForPositionUnclamped(int position) const;
+    double getValueForPosition(int position) const override;
+    double getValueForPositionUnclamped(int position) const override;
 
-    virtual QString getUnit() const { return m_unit; }
+    QString getUnit() const override { return m_unit; }
 
 protected:
     int m_minpos;
@@ -175,13 +175,13 @@
     InterpolatingRangeMapper(CoordMap pointMappings,
                              QString unit);
 
-    virtual int getPositionForValue(double value) const;
-    virtual int getPositionForValueUnclamped(double value) const;
+    int getPositionForValue(double value) const override;
+    int getPositionForValueUnclamped(double value) const override;
 
-    virtual double getValueForPosition(int position) const;
-    virtual double getValueForPositionUnclamped(int position) const;
+    double getValueForPosition(int position) const override;
+    double getValueForPositionUnclamped(int position) const override;
 
-    virtual QString getUnit() const { return m_unit; }
+    QString getUnit() const override { return m_unit; }
 
 protected:
     CoordMap m_mappings;
@@ -248,13 +248,13 @@
      */
     MappingType getType() const { return m_type; }
 
-    virtual int getPositionForValue(double value) const;
-    virtual int getPositionForValueUnclamped(double value) const;
+    int getPositionForValue(double value) const override;
+    int getPositionForValueUnclamped(double value) const override;
 
-    virtual double getValueForPosition(int position) const;
-    virtual double getValueForPositionUnclamped(int position) const;
+    double getValueForPosition(int position) const override;
+    double getValueForPositionUnclamped(int position) const override;
 
-    virtual QString getUnit() const { return m_unit; }
+    QString getUnit() const override { return m_unit; }
 
 protected:
     MappingType m_type;
--- a/base/RealTimeSV.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/RealTimeSV.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -118,7 +118,7 @@
         }
 
         double value = 0.0;
-        char *eptr = 0;
+        char *eptr = nullptr;
 
         if (isdigit(s[i]) || s[i] == '.') {
             value = strtod(&s[i], &eptr);
--- a/base/RecentFiles.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/RecentFiles.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RECENT_FILES_H_
-#define _RECENT_FILES_H_
+#ifndef SV_RECENT_FILES_H
+#define SV_RECENT_FILES_H
 
 #include <QObject>
 #include <QString>
--- a/base/ResourceFinder.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/ResourceFinder.h	Wed Jan 09 15:24:38 2019 +0000
@@ -19,8 +19,8 @@
    development team.
 */
 
-#ifndef _RESOURCE_FINDER_H_
-#define _RESOURCE_FINDER_H_
+#ifndef SV_RESOURCE_FINDER_H
+#define SV_RESOURCE_FINDER_H
 
 #include <QString>
 
--- a/base/Scavenger.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Scavenger.h	Wed Jan 09 15:24:38 2019 +0000
@@ -19,8 +19,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _SCAVENGER_H_
-#define _SCAVENGER_H_
+#ifndef SV_SCAVENGER_H
+#define SV_SCAVENGER_H
 
 #include "system/System.h"
 
--- a/base/Selection.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Selection.h	Wed Jan 09 15:24:38 2019 +0000
@@ -83,8 +83,8 @@
      */
     Selection getContainingSelection(sv_frame_t frame, bool defaultToFollowing) const;
 
-    virtual void toXml(QTextStream &stream, QString indent = "",
-                       QString extraAttributes = "") const;
+    void toXml(QTextStream &stream, QString indent = "",
+                       QString extraAttributes = "") const override;
 
 protected:
     SelectionList m_selections;
--- a/base/Serialiser.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Serialiser.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SERIALISER_H_
-#define _SERIALISER_H_
+#ifndef SV_SERIALISER_H
+#define SV_SERIALISER_H
 
 #include <QString>
 #include <QMutex>
--- a/base/TempDirectory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/TempDirectory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -110,7 +110,7 @@
 
     QString suffix;
     int padlen = 6, attempts = 100;
-    unsigned int r = (unsigned int)(time(0) ^ getpid());
+    unsigned int r = (unsigned int)(time(nullptr) ^ getpid());
 
     for (int i = 0; i < padlen; ++i) {
         suffix += "X";
--- a/base/TextMatcher.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/TextMatcher.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TEXT_MATCHER_H_
-#define _TEXT_MATCHER_H_
+#ifndef SV_TEXT_MATCHER_H
+#define SV_TEXT_MATCHER_H
 
 #include <QString>
 #include <QStringList>
--- a/base/Thread.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Thread.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _THREAD_H_
-#define _THREAD_H_
+#ifndef SV_THREAD_H
+#define SV_THREAD_H
 
 #include <QThread>
 #include <QMutexLocker>
@@ -34,7 +34,7 @@
     void start();
 
 protected:
-    virtual void run() = 0;
+    void run() override = 0;
 
 private:    
     Type m_type;
--- a/base/UnitDatabase.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/UnitDatabase.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _UNIT_DATABASE_H_
-#define _UNIT_DATABASE_H_
+#ifndef SV_UNIT_DATABASE_H
+#define SV_UNIT_DATABASE_H
 
 #include <QObject>
 #include <QString>
--- a/base/Window.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/Window.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _WINDOW_H_
-#define _WINDOW_H_
+#ifndef SV_WINDOW_H
+#define SV_WINDOW_H
 
 #include <cmath>
 #include <iostream>
--- a/base/XmlExportable.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/base/XmlExportable.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _XML_EXPORTABLE_H_
-#define _XML_EXPORTABLE_H_
+#ifndef SV_XML_EXPORTABLE_H
+#define SV_XML_EXPORTABLE_H
 
 #include <QString>
 
--- a/data/fileio/AudioFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/AudioFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _AUDIO_FILE_READER_H_
-#define _AUDIO_FILE_READER_H_
+#ifndef SV_AUDIO_FILE_READER_H
+#define SV_AUDIO_FILE_READER_H
 
 #include <QString>
 
--- a/data/fileio/AudioFileReaderFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/AudioFileReaderFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -68,15 +68,15 @@
 
     if (!source.isOK()) {
         SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Failed to retrieve source (transmission error?): " << source.getErrorString() << endl;
-        return 0;
+        return nullptr;
     }
 
     if (!source.isAvailable()) {
         SVCERR << "AudioFileReaderFactory::createReader(\"" << source.getLocation() << "\": Source not found" << endl;
-        return 0;
+        return nullptr;
     }
 
-    AudioFileReader *reader = 0;
+    AudioFileReader *reader = nullptr;
 
     sv_samplerate_t targetRate = params.targetRate;
     bool normalised = (params.normalisation == Normalisation::Peak);
--- a/data/fileio/AudioFileSizeEstimator.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/AudioFileSizeEstimator.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -51,7 +51,7 @@
     }
 
     delete reader;
-    reader = 0;
+    reader = nullptr;
 
     if (estimate == 0) {
 
--- a/data/fileio/BZipFileDevice.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/BZipFileDevice.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -31,8 +31,8 @@
 BZipFileDevice::BZipFileDevice(QString fileName) :
     m_fileName(fileName),
     m_qfile(fileName),
-    m_file(0),
-    m_bzFile(0),
+    m_file(nullptr),
+    m_bzFile(nullptr),
     m_atEnd(true),
     m_ok(true)
 {
@@ -120,7 +120,7 @@
 
         if (!m_bzFile) {
             fclose(m_file);
-            m_file = 0;
+            m_file = nullptr;
             m_qfile.close();
             setErrorString(tr("Failed to open bzip2 stream for writing"));
             m_ok = false;
@@ -150,11 +150,11 @@
         }
 
         int bzError = BZ_OK;
-        m_bzFile = BZ2_bzReadOpen(&bzError, m_file, 0, 0, NULL, 0);
+        m_bzFile = BZ2_bzReadOpen(&bzError, m_file, 0, 0, nullptr, 0);
 
         if (!m_bzFile) {
             fclose(m_file);
-            m_file = 0;
+            m_file = nullptr;
             m_qfile.close();
             setErrorString(tr("Failed to open bzip2 stream for reading"));
             m_ok = false;
@@ -195,8 +195,8 @@
         }
         fclose(m_file);
         m_qfile.close();
-        m_bzFile = 0;
-        m_file = 0;
+        m_bzFile = nullptr;
+        m_file = nullptr;
         m_ok = false;
         return;
     }
@@ -208,8 +208,8 @@
         }
         fclose(m_file);
         m_qfile.close();
-        m_bzFile = 0;
-        m_file = 0;
+        m_bzFile = nullptr;
+        m_file = nullptr;
         m_ok = false;
         return;
     }
--- a/data/fileio/BZipFileDevice.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/BZipFileDevice.h	Wed Jan 09 15:24:38 2019 +0000
@@ -29,16 +29,16 @@
     BZipFileDevice(QString fileName);
     virtual ~BZipFileDevice();
     
-    virtual bool open(OpenMode mode);
-    virtual void close();
+    bool open(OpenMode mode) override;
+    void close() override;
 
     virtual bool isOK() const;
 
-    virtual bool isSequential() const { return true; }
+    bool isSequential() const override { return true; }
 
 protected:
-    virtual qint64 readData(char *data, qint64 maxSize);
-    virtual qint64 writeData(const char *data, qint64 maxSize);
+    qint64 readData(char *data, qint64 maxSize) override;
+    qint64 writeData(const char *data, qint64 maxSize) override;
 
     QString m_fileName;
 
--- a/data/fileio/CSVFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CSVFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -47,7 +47,7 @@
                              sv_samplerate_t mainModelSampleRate,
                              ProgressReporter *reporter) :
     m_format(format),
-    m_device(0),
+    m_device(nullptr),
     m_ownDevice(true),
     m_warnings(0),
     m_mainModelSampleRate(mainModelSampleRate),
@@ -107,7 +107,7 @@
 bool
 CSVFileReader::isOK() const
 {
-    return (m_device != 0);
+    return (m_device != nullptr);
 }
 
 QString
@@ -172,7 +172,7 @@
 Model *
 CSVFileReader::load() const
 {
-    if (!m_device) return 0;
+    if (!m_device) return nullptr;
 
     CSVFormat::ModelType modelType = m_format.getModelType();
     CSVFormat::TimingType timingType = m_format.getTimingType();
@@ -197,13 +197,13 @@
         }
     }
 
-    SparseOneDimensionalModel *model1 = 0;
-    SparseTimeValueModel *model2 = 0;
-    RegionModel *model2a = 0;
-    NoteModel *model2b = 0;
-    EditableDenseThreeDimensionalModel *model3 = 0;
-    WritableWaveFileModel *modelW = 0;
-    Model *model = 0;
+    SparseOneDimensionalModel *model1 = nullptr;
+    SparseTimeValueModel *model2 = nullptr;
+    RegionModel *model2a = nullptr;
+    NoteModel *model2b = nullptr;
+    EditableDenseThreeDimensionalModel *model3 = nullptr;
+    WritableWaveFileModel *modelW = nullptr;
+    Model *model = nullptr;
 
     QTextStream in(m_device);
 
@@ -231,7 +231,7 @@
     }
 
     int audioChannels = 0;
-    float **audioSamples = 0;
+    float **audioSamples = nullptr;
     float sampleShift = 0.f;
     float sampleScale = 1.f;
 
@@ -370,9 +370,9 @@
                        << endl;
                 if (model) {
                     delete model;
-                    model = 0;
-                    model1 = 0; model2 = 0; model2a = 0; model2b = 0;
-                    model3 = 0; modelW = 0;
+                    model = nullptr;
+                    model1 = nullptr; model2 = nullptr; model2a = nullptr; model2b = nullptr;
+                    model3 = nullptr; modelW = nullptr;
                 }
                 abandoned = true;
                 break;
--- a/data/fileio/CSVFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CSVFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -52,10 +52,10 @@
 
     virtual ~CSVFileReader();
 
-    virtual bool isOK() const;
-    virtual QString getError() const;
+    bool isOK() const override;
+    QString getError() const override;
 
-    virtual Model *load() const;
+    Model *load() const override;
 
 protected:
     CSVFormat m_format;
--- a/data/fileio/CachedFile.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CachedFile.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _CACHED_FILE_H_
-#define _CACHED_FILE_H_
+#ifndef SV_CACHED_FILE_H
+#define SV_CACHED_FILE_H
 
 #include <QString>
 #include <QUrl>
--- a/data/fileio/CodedAudioFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CodedAudioFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -36,15 +36,15 @@
                                            bool normalised) :
     m_cacheMode(cacheMode),
     m_initialised(false),
-    m_serialiser(0),
+    m_serialiser(nullptr),
     m_fileRate(0),
-    m_cacheFileWritePtr(0),
-    m_cacheFileReader(0),
-    m_cacheWriteBuffer(0),
+    m_cacheFileWritePtr(nullptr),
+    m_cacheFileReader(nullptr),
+    m_cacheWriteBuffer(nullptr),
     m_cacheWriteBufferIndex(0),
     m_cacheWriteBufferFrames(65536),
-    m_resampler(0),
-    m_resampleBuffer(0),
+    m_resampler(nullptr),
+    m_resampleBuffer(nullptr),
     m_resampleBufferFrames(0),
     m_fileFrameCount(0),
     m_normalised(normalised),
@@ -119,7 +119,7 @@
     SVDEBUG << "CodedAudioFileReader(" << this << ")::endSerialised: id = " << (m_serialiser ? m_serialiser->getId() : "(none)") << endl;
 
     delete m_serialiser;
-    m_serialiser = 0;
+    m_serialiser = nullptr;
 }
 
 void
@@ -218,7 +218,7 @@
                 if (!m_cacheFileReader->isOK()) {
                     SVDEBUG << "ERROR: CodedAudioFileReader::initialiseDecodeCache: Failed to construct WAV file reader for temporary file: " << m_cacheFileReader->getError() << endl;
                     delete m_cacheFileReader;
-                    m_cacheFileReader = 0;
+                    m_cacheFileReader = nullptr;
                     m_cacheMode = CacheInMemory;
                     sf_close(m_cacheFileWritePtr);
                 }
@@ -331,18 +331,18 @@
     pushCacheWriteBufferMaybe(true);
 
     delete[] m_cacheWriteBuffer;
-    m_cacheWriteBuffer = 0;
+    m_cacheWriteBuffer = nullptr;
 
     delete[] m_resampleBuffer;
-    m_resampleBuffer = 0;
+    m_resampleBuffer = nullptr;
 
     delete m_resampler;
-    m_resampler = 0;
+    m_resampler = nullptr;
 
     if (m_cacheMode == CacheInTemporaryFile) {
 
         sf_close(m_cacheFileWritePtr);
-        m_cacheFileWritePtr = 0;
+        m_cacheFileWritePtr = nullptr;
         if (m_cacheFileReader) m_cacheFileReader->updateFrameCount();
 
     } else {
@@ -471,7 +471,7 @@
     case CacheInTemporaryFile:
         if (sf_writef_float(m_cacheFileWritePtr, buffer, sz) < sz) {
             sf_close(m_cacheFileWritePtr);
-            m_cacheFileWritePtr = 0;
+            m_cacheFileWritePtr = nullptr;
             throw InsufficientDiscSpace(TempDirectory::getInstance()->getPath());
         }
         break;
--- a/data/fileio/CodedAudioFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CodedAudioFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -52,14 +52,14 @@
         DecodeThreaded // decode in a background thread after construction
     };
 
-    virtual floatvec_t getInterleavedFrames(sv_frame_t start, sv_frame_t count) const;
+    floatvec_t getInterleavedFrames(sv_frame_t start, sv_frame_t count) const override;
 
-    virtual sv_samplerate_t getNativeRate() const { return m_fileRate; }
+    sv_samplerate_t getNativeRate() const override { return m_fileRate; }
 
-    virtual QString getLocalFilename() const { return m_cacheFileName; }
+    QString getLocalFilename() const override { return m_cacheFileName; }
     
     /// Intermediate cache means all CodedAudioFileReaders are quickly seekable
-    virtual bool isQuicklySeekable() const { return true; }
+    bool isQuicklySeekable() const override { return true; }
 
 signals:
     void progress(int);
--- a/data/fileio/CoreAudioFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/CoreAudioFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _COREAUDIO_FILE_READER_H_
-#define _COREAUDIO_FILE_READER_H_
+#ifndef SV_COREAUDIO_FILE_READER_H
+#define SV_COREAUDIO_FILE_READER_H
 
 #ifdef HAVE_COREAUDIO
 
--- a/data/fileio/DataFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/DataFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _DATA_FILE_READER_H_
-#define _DATA_FILE_READER_H_
+#ifndef SV_DATA_FILE_READER_H
+#define SV_DATA_FILE_READER_H
 
 #include <QString>
 #include <QObject>
--- a/data/fileio/DataFileReaderFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/DataFileReaderFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -37,7 +37,7 @@
 {
     QString err;
 
-    DataFileReader *reader = 0;
+    DataFileReader *reader = nullptr;
 
     if (!csv) {
         reader = new MIDIFileReader(path,
@@ -59,7 +59,7 @@
         delete reader;
     }
 
-    return 0;
+    return nullptr;
 }
 
 DataFileReader *
@@ -76,7 +76,7 @@
         (path, true, acquirer, CSVFormat(path), mainModelSampleRate, reporter);
     if (reader) return reader;
 
-    return 0;
+    return nullptr;
 }
 
 Model *
@@ -89,7 +89,7 @@
                                           acquirer,
                                           mainModelSampleRate,
                                           reporter);
-    if (!reader) return NULL;
+    if (!reader) return nullptr;
 
     try {
         Model *model = reader->load();
@@ -112,7 +112,7 @@
                                           CSVFormat(),
                                           mainModelSampleRate,
                                           reporter);
-    if (!reader) return NULL;
+    if (!reader) return nullptr;
 
     try {
         Model *model = reader->load();
@@ -129,10 +129,10 @@
                                sv_samplerate_t mainModelSampleRate,
                                ProgressReporter *reporter)
 {
-    DataFileReader *reader = createReader(path, true, 0, format,
+    DataFileReader *reader = createReader(path, true, nullptr, format,
                                           mainModelSampleRate,
                                           reporter);
-    if (!reader) return NULL;
+    if (!reader) return nullptr;
 
     try {
         Model *model = reader->load();
--- a/data/fileio/DecodingWavFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/DecodingWavFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -35,9 +35,9 @@
     m_cancelled(false),
     m_processed(0),
     m_completion(0),
-    m_original(0),
+    m_original(nullptr),
     m_reporter(reporter),
-    m_decodeThread(0)
+    m_decodeThread(nullptr)
 {
     SVDEBUG << "DecodingWavFileReader: local path: \"" << m_path
             << "\", decode mode: " << decodeMode << " ("
@@ -90,7 +90,7 @@
         if (m_reporter) m_reporter->setProgress(100);
 
         delete m_original;
-        m_original = 0;
+        m_original = nullptr;
 
     } else {
 
@@ -147,7 +147,7 @@
     m_reader->endSerialised();
 
     delete m_reader->m_original;
-    m_reader->m_original = 0;
+    m_reader->m_original = nullptr;
 } 
 
 void
--- a/data/fileio/DecodingWavFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/DecodingWavFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _DECODING_WAV_FILE_READER_H_
-#define _DECODING_WAV_FILE_READER_H_
+#ifndef SV_DECODING_WAV_FILE_READER_H
+#define SV_DECODING_WAV_FILE_READER_H
 
 #include "CodedAudioFileReader.h"
 
@@ -37,16 +37,16 @@
                           ProgressReporter *reporter = 0);
     virtual ~DecodingWavFileReader();
 
-    virtual QString getError() const { return m_error; }
-    virtual QString getLocation() const { return m_source.getLocation(); }
+    QString getError() const override { return m_error; }
+    QString getLocation() const override { return m_source.getLocation(); }
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return m_completion; }
+    int getDecodeCompletion() const override { return m_completion; }
 
-    virtual bool isUpdating() const {
+    bool isUpdating() const override {
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
@@ -70,7 +70,7 @@
     {
     public:
         DecodeThread(DecodingWavFileReader *reader) : m_reader(reader) { }
-        virtual void run();
+        void run() override;
 
     protected:
         DecodingWavFileReader *m_reader;
--- a/data/fileio/FileReadThread.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/FileReadThread.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FILE_READ_THREAD_H_
-#define _FILE_READ_THREAD_H_
+#ifndef SV_FILE_READ_THREAD_H
+#define SV_FILE_READ_THREAD_H
 
 #include "base/Thread.h"
 
@@ -33,7 +33,7 @@
 public:
     FileReadThread();
 
-    virtual void run();
+    void run() override;
     virtual void finish();
 
     struct Request {
--- a/data/fileio/FileSource.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/FileSource.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -91,8 +91,8 @@
                        QString preferredContentType) :
     m_rawFileOrUrl(fileOrUrl),
     m_url(fileOrUrl, QUrl::StrictMode),
-    m_localFile(0),
-    m_reply(0),
+    m_localFile(nullptr),
+    m_reply(nullptr),
     m_preferredContentType(preferredContentType),
     m_ok(false),
     m_cancelled(false),
@@ -182,8 +182,8 @@
 
 FileSource::FileSource(QUrl url, ProgressReporter *reporter) :
     m_url(url),
-    m_localFile(0),
-    m_reply(0),
+    m_localFile(nullptr),
+    m_reply(nullptr),
     m_ok(false),
     m_cancelled(false),
     m_lastStatus(0),
@@ -215,8 +215,8 @@
 FileSource::FileSource(const FileSource &rf) :
     QObject(),
     m_url(rf.m_url),
-    m_localFile(0),
-    m_reply(0),
+    m_localFile(nullptr),
+    m_reply(nullptr),
     m_ok(rf.m_ok),
     m_cancelled(rf.m_cancelled),
     m_lastStatus(rf.m_lastStatus),
@@ -385,7 +385,7 @@
         qint64 written = m_localFile->write(ba);
         m_localFile->close();
         delete m_localFile;
-        m_localFile = 0;
+        m_localFile = nullptr;
 
         if (written != ba.size()) {
 #ifdef DEBUG_FILE_SOURCE
@@ -502,13 +502,13 @@
 {
     if (m_done) {
         delete m_localFile; // does not actually delete the file
-        m_localFile = 0;
+        m_localFile = nullptr;
     }
     m_done = true;
     if (m_reply) {
         QNetworkReply *r = m_reply;
-        disconnect(r, 0, this, 0);
-        m_reply = 0;
+        disconnect(r, nullptr, this, nullptr);
+        m_reply = nullptr;
         // Can only call abort() when there are no errors.
         if (r->error() == QNetworkReply::NoError) {
             r->abort();
@@ -517,7 +517,7 @@
     }
     if (m_localFile) {
         delete m_localFile; // does not actually delete the file
-        m_localFile = 0;
+        m_localFile = nullptr;
     }
 }
 
@@ -693,7 +693,7 @@
                 incCount(newUrl.toString());
 #endif
                 m_url = newUrl;
-                m_localFile = 0;
+                m_localFile = nullptr;
                 m_lastStatus = 0;
                 m_done = false;
                 m_refCounted = false;
--- a/data/fileio/FileSource.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/FileSource.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FILE_SOURCE_H_
-#define _FILE_SOURCE_H_
+#ifndef SV_FILE_SOURCE_H
+#define SV_FILE_SOURCE_H
 
 #include <QUrl>
 #include <QMutex>
--- a/data/fileio/MIDIFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MIDIFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -69,7 +69,7 @@
     m_trackByteCount(0),
     m_decrementCount(false),
     m_path(path),
-    m_midiFile(0),
+    m_midiFile(nullptr),
     m_fileSize(0),
     m_mainModelSampleRate(mainModelSampleRate),
     m_acquirer(acquirer)
@@ -291,7 +291,7 @@
         m_error = "File not found or not readable.";
         m_format = MIDI_FILE_BAD_FORMAT;
         delete m_midiFile;
-        m_midiFile = 0;
+        m_midiFile = nullptr;
         return false;
     }
 
@@ -801,14 +801,14 @@
 Model *
 MIDIFileReader::load() const
 {
-    if (!isOK()) return 0;
+    if (!isOK()) return nullptr;
 
     if (m_loadableTracks.empty()) {
         if (m_acquirer) {
             m_acquirer->showError
                 (tr("MIDI file \"%1\" has no notes in any track").arg(m_path));
         }
-        return 0;
+        return nullptr;
     }
 
     std::set<unsigned int> tracksToLoad;
@@ -859,7 +859,7 @@
             pref = MIDIFileImportPreferenceAcquirer::MergeAllTracks;
         }
 
-        if (pref == MIDIFileImportPreferenceAcquirer::ImportNothing) return 0;
+        if (pref == MIDIFileImportPreferenceAcquirer::ImportNothing) return nullptr;
 
         if (pref == MIDIFileImportPreferenceAcquirer::MergeAllTracks ||
             pref == MIDIFileImportPreferenceAcquirer::MergeAllNonPercussionTracks) {
@@ -891,10 +891,10 @@
         }
     }
 
-    if (tracksToLoad.empty()) return 0;
+    if (tracksToLoad.empty()) return nullptr;
 
     int n = int(tracksToLoad.size()), count = 0;
-    Model *model = 0;
+    Model *model = nullptr;
 
     for (std::set<unsigned int>::iterator i = tracksToLoad.begin();
          i != tracksToLoad.end(); ++i) {
@@ -921,10 +921,10 @@
                           int progressAmount) const
 {
     if (m_midiComposition.find(trackToLoad) == m_midiComposition.end()) {
-        return 0;
+        return nullptr;
     }
 
-    NoteModel *model = 0;
+    NoteModel *model = nullptr;
 
     if (existingModel) {
         model = dynamic_cast<NoteModel *>(existingModel);
--- a/data/fileio/MIDIFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MIDIFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -66,9 +66,9 @@
                    ProgressReporter *reporter = 0);
     virtual ~MIDIFileReader();
 
-    virtual bool isOK() const;
-    virtual QString getError() const;
-    virtual Model *load() const;
+    bool isOK() const override;
+    QString getError() const override;
+    Model *load() const override;
 
 protected:
     typedef std::vector<MIDIEvent *> MIDITrack;
--- a/data/fileio/MIDIFileWriter.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MIDIFileWriter.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -46,7 +46,7 @@
     m_exportable(exportable),
     m_sampleRate(sampleRate),
     m_tempo(tempo),
-    m_midiFile(0)
+    m_midiFile(nullptr)
 {
     if (!convert()) {
         m_error = "Conversion from model to internal MIDI format failed";
@@ -288,7 +288,7 @@
     if (!(*m_midiFile)) {
         m_error = "Can't open file for writing.";
         delete m_midiFile;
-        m_midiFile = 0;
+        m_midiFile = nullptr;
         return false;
     }
 
@@ -304,7 +304,7 @@
 
     m_midiFile->close();
     delete m_midiFile;
-    m_midiFile = 0;
+    m_midiFile = nullptr;
 
     if (!retOK) {
         m_error = "MIDI file write failed";
--- a/data/fileio/MIDIFileWriter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MIDIFileWriter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -20,8 +20,8 @@
    and copyright 2007 QMUL.
 */
 
-#ifndef _MIDI_FILE_WRITER_H_
-#define _MIDI_FILE_WRITER_H_
+#ifndef SV_MIDI_FILE_WRITER_H
+#define SV_MIDI_FILE_WRITER_H
 
 #include "base/RealTime.h"
 #include "base/BaseTypes.h"
--- a/data/fileio/MP3FileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MP3FileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -58,7 +58,7 @@
     m_path(source.getLocalFilename()),
     m_gaplessMode(gaplessMode),
     m_decodeErrorShown(false),
-    m_decodeThread(0)
+    m_decodeThread(nullptr)
 {
     SVDEBUG << "MP3FileReader: local path: \"" << m_path
             << "\", decode mode: " << decodeMode << " ("
@@ -82,10 +82,10 @@
     
     m_fileSize = 0;
 
-    m_fileBuffer = 0;
+    m_fileBuffer = nullptr;
     m_fileBufferSize = 0;
 
-    m_sampleBuffer = 0;
+    m_sampleBuffer = nullptr;
     m_sampleBufferSize = 0;
 
     QFile qfile(m_path);
@@ -142,11 +142,11 @@
                 delete[] m_sampleBuffer[c];
             }
             delete[] m_sampleBuffer;
-            m_sampleBuffer = 0;
+            m_sampleBuffer = nullptr;
         }
         
         delete[] m_fileBuffer;
-        m_fileBuffer = 0;
+        m_fileBuffer = nullptr;
 
         if (isDecodeCacheInitialised()) finishDecodeCache();
         endSerialised();
@@ -292,14 +292,14 @@
     }
 
     delete[] m_reader->m_fileBuffer;
-    m_reader->m_fileBuffer = 0;
+    m_reader->m_fileBuffer = nullptr;
 
     if (m_reader->m_sampleBuffer) {
         for (int c = 0; c < m_reader->m_channelCount; ++c) {
             delete[] m_reader->m_sampleBuffer[c];
         }
         delete[] m_reader->m_sampleBuffer;
-        m_reader->m_sampleBuffer = 0;
+        m_reader->m_sampleBuffer = nullptr;
     }
 
     if (m_reader->isDecodeCacheInitialised()) m_reader->finishDecodeCache();
@@ -324,11 +324,11 @@
     mad_decoder_init(&decoder,          // decoder to initialise
                      &data,             // our own data block for callbacks
                      input_callback,    // provides (entire) input to mad
-                     0,                 // checks header
+                     nullptr,                 // checks header
                      filter_callback,   // filters frame before decoding
                      output_callback,   // receives decoded output
                      error_callback,    // handles decode errors
-                     0);                // "message_func"
+                     nullptr);                // "message_func"
 
     mad_decoder_run(&decoder, MAD_DECODER_MODE_SYNC);
     mad_decoder_finish(&decoder);
@@ -540,7 +540,7 @@
         if (!m_sampleBuffer) {
             m_sampleBuffer = new float *[channels];
             for (int c = 0; c < channels; ++c) {
-                m_sampleBuffer[c] = 0;
+                m_sampleBuffer[c] = nullptr;
             }
         }
         for (int c = 0; c < channels; ++c) {
--- a/data/fileio/MP3FileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/MP3FileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _MP3_FILE_READER_H_
-#define _MP3_FILE_READER_H_
+#ifndef SV_MP3_FILE_READER_H
+#define SV_MP3_FILE_READER_H
 
 #ifdef HAVE_MAD
 
@@ -74,21 +74,21 @@
                   ProgressReporter *reporter = 0);
     virtual ~MP3FileReader();
 
-    virtual QString getError() const { return m_error; }
+    QString getError() const override { return m_error; }
 
-    virtual QString getLocation() const { return m_source.getLocation(); }
-    virtual QString getTitle() const { return m_title; }
-    virtual QString getMaker() const { return m_maker; }
-    virtual TagMap getTags() const { return m_tags; }
+    QString getLocation() const override { return m_source.getLocation(); }
+    QString getTitle() const override { return m_title; }
+    QString getMaker() const override { return m_maker; }
+    TagMap getTags() const override { return m_tags; }
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return m_completion; }
+    int getDecodeCompletion() const override { return m_completion; }
 
-    virtual bool isUpdating() const {
+    bool isUpdating() const override {
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
@@ -144,7 +144,7 @@
     {
     public:
         DecodeThread(MP3FileReader *reader) : m_reader(reader) { }
-        virtual void run();
+        void run() override;
 
     protected:
         MP3FileReader *m_reader;
--- a/data/fileio/OggVorbisFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/OggVorbisFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -40,17 +40,17 @@
     CodedAudioFileReader(mode, targetRate, normalised),
     m_source(source),
     m_path(source.getLocalFilename()),
-    m_qfile(0),
-    m_ffile(0),
-    m_oggz(0),
-    m_fishSound(0),
+    m_qfile(nullptr),
+    m_ffile(nullptr),
+    m_oggz(nullptr),
+    m_fishSound(nullptr),
     m_reporter(reporter),
     m_fileSize(0),
     m_bytesRead(0),
     m_commentsRead(false),
     m_cancelled(false),
     m_completion(0),
-    m_decodeThread(0)
+    m_decodeThread(nullptr)
 {
     SVDEBUG << "OggVorbisFileReader: local path: \"" << m_path
             << "\", decode mode: " << decodeMode << " ("
@@ -72,7 +72,7 @@
         m_error = QString("Failed to open file %1 for reading.").arg(m_path);
         SVDEBUG << "OggVorbisFileReader: " << m_error << endl;
         delete m_qfile;
-        m_qfile = 0;
+        m_qfile = nullptr;
         return;
     }
     
@@ -83,16 +83,16 @@
         m_error = QString("Failed to open file pointer for file %1").arg(m_path);
         SVDEBUG << "OggVorbisFileReader: " << m_error << endl;
         delete m_qfile;
-        m_qfile = 0;
+        m_qfile = nullptr;
         return;
     }
     
     if (!(m_oggz = oggz_open_stdio(m_ffile, OGGZ_READ))) {
         m_error = QString("File %1 is not an OGG file.").arg(m_path);
         fclose(m_ffile);
-        m_ffile = 0;
+        m_ffile = nullptr;
         delete m_qfile;
-        m_qfile = 0;
+        m_qfile = nullptr;
         return;
     }
 
@@ -113,9 +113,9 @@
         while (oggz_read(m_oggz, 1024) > 0);
         
         fish_sound_delete(m_fishSound);
-        m_fishSound = 0;
+        m_fishSound = nullptr;
         oggz_close(m_oggz);
-        m_oggz = 0;
+        m_oggz = nullptr;
 
         if (isDecodeCacheInitialised()) finishDecodeCache();
         endSerialised();
@@ -145,7 +145,7 @@
     if (m_qfile) {
         // don't fclose m_ffile; oggz_close did that
         delete m_qfile;
-        m_qfile = 0;
+        m_qfile = nullptr;
     }
 }
 
@@ -166,15 +166,15 @@
     while (oggz_read(m_reader->m_oggz, 1024) > 0);
         
     fish_sound_delete(m_reader->m_fishSound);
-    m_reader->m_fishSound = 0;
+    m_reader->m_fishSound = nullptr;
 
     oggz_close(m_reader->m_oggz);
-    m_reader->m_oggz = 0;
+    m_reader->m_oggz = nullptr;
 
     // don't fclose m_ffile; oggz_close did that
 
     delete m_reader->m_qfile;
-    m_reader->m_qfile = 0;
+    m_reader->m_qfile = nullptr;
     
     if (m_reader->isDecodeCacheInitialised()) m_reader->finishDecodeCache();
     m_reader->m_completion = 100;
--- a/data/fileio/OggVorbisFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/OggVorbisFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -44,21 +44,21 @@
                         ProgressReporter *reporter = nullptr);
     virtual ~OggVorbisFileReader();
 
-    virtual QString getError() const { return m_error; }
+    QString getError() const override { return m_error; }
 
-    virtual QString getLocation() const { return m_source.getLocation(); }
-    virtual QString getTitle() const { return m_title; }
-    virtual QString getMaker() const { return m_maker; }
-    virtual TagMap getTags() const { return m_tags; }
+    QString getLocation() const override { return m_source.getLocation(); }
+    QString getTitle() const override { return m_title; }
+    QString getMaker() const override { return m_maker; }
+    TagMap getTags() const override { return m_tags; }
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return m_completion; }
+    int getDecodeCompletion() const override { return m_completion; }
 
-    virtual bool isUpdating() const {
+    bool isUpdating() const override {
         return m_decodeThread && m_decodeThread->isRunning();
     }
 
@@ -91,7 +91,7 @@
     {
     public:
         DecodeThread(OggVorbisFileReader *reader) : m_reader(reader) { }
-        virtual void run();
+        void run() override;
 
     protected:
         OggVorbisFileReader *m_reader; 
--- a/data/fileio/PlaylistFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/PlaylistFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -25,7 +25,7 @@
 
 PlaylistFileReader::PlaylistFileReader(QString path) :
     m_source(path),
-    m_file(0)
+    m_file(nullptr)
 {
     if (!m_source.isAvailable()) {
         m_error = QFile::tr("File or URL \"%1\" could not be retrieved")
@@ -37,7 +37,7 @@
 
 PlaylistFileReader::PlaylistFileReader(FileSource source) :
     m_source(source),
-    m_file(0)
+    m_file(nullptr)
 {
     if (!m_source.isAvailable()) {
         m_error = QFile::tr("File or URL \"%1\" could not be retrieved")
@@ -83,14 +83,14 @@
 
     if (!good) {
         delete m_file;
-        m_file = 0;
+        m_file = nullptr;
     }
 }
 
 bool
 PlaylistFileReader::isOK() const
 {
-    return (m_file != 0);
+    return (m_file != nullptr);
 }
 
 QString
--- a/data/fileio/PlaylistFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/PlaylistFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLAYLIST_FILE_READER_H_
-#define _PLAYLIST_FILE_READER_H_
+#ifndef SV_PLAYLIST_FILE_READER_H
+#define SV_PLAYLIST_FILE_READER_H
 
 #include "FileSource.h"
 
--- a/data/fileio/WavFileReader.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/WavFileReader.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -28,7 +28,7 @@
 WavFileReader::WavFileReader(FileSource source,
                              bool fileUpdating,
                              Normalisation normalisation) :
-    m_file(0),
+    m_file(nullptr),
     m_source(source),
     m_path(source.getLocalFilename()),
     m_seekable(false),
@@ -270,7 +270,7 @@
 {
     int count;
 
-    if (sf_command(0, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof(count))) {
+    if (sf_command(nullptr, SFC_GET_FORMAT_MAJOR_COUNT, &count, sizeof(count))) {
         extensions.insert("wav");
         extensions.insert("aiff");
         extensions.insert("aifc");
@@ -281,7 +281,7 @@
     SF_FORMAT_INFO info;
     for (int i = 0; i < count; ++i) {
         info.format = i;
-        if (!sf_command(0, SFC_GET_FORMAT_MAJOR, &info, sizeof(info))) {
+        if (!sf_command(nullptr, SFC_GET_FORMAT_MAJOR, &info, sizeof(info))) {
             QString ext = QString(info.extension).toLower();
             extensions.insert(ext);
             if (ext == "oga") {
--- a/data/fileio/WavFileReader.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/WavFileReader.h	Wed Jan 09 15:24:38 2019 +0000
@@ -48,28 +48,27 @@
                   Normalisation normalise = Normalisation::None);
     virtual ~WavFileReader();
 
-    virtual QString getLocation() const { return m_source.getLocation(); }
-    virtual QString getError() const { return m_error; }
+    QString getLocation() const override { return m_source.getLocation(); }
+    QString getError() const override { return m_error; }
 
-    virtual QString getLocalFilename() const { return m_path; }
+    QString getLocalFilename() const override { return m_path; }
     
-    virtual bool isQuicklySeekable() const { return m_seekable; }
+    bool isQuicklySeekable() const override { return m_seekable; }
     
     /** 
      * Must be safe to call from multiple threads with different
      * arguments on the same object at the same time.
      */
-    virtual floatvec_t getInterleavedFrames(sv_frame_t start, sv_frame_t count)
-        const;
+    floatvec_t getInterleavedFrames(sv_frame_t start, sv_frame_t count) const override;
     
     static void getSupportedExtensions(std::set<QString> &extensions);
     static bool supportsExtension(QString ext);
     static bool supportsContentType(QString type);
     static bool supports(FileSource &source);
 
-    virtual int getDecodeCompletion() const { return 100; }
+    int getDecodeCompletion() const override { return 100; }
 
-    bool isUpdating() const { return m_updating; }
+    bool isUpdating() const override { return m_updating; }
 
     void updateFrameCount();
     void updateDone();
--- a/data/fileio/WavFileWriter.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/fileio/WavFileWriter.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -39,8 +39,8 @@
     m_path(path),
     m_sampleRate(sampleRate),
     m_channels(channels),
-    m_temp(0),
-    m_file(0)
+    m_temp(nullptr),
+    m_file(nullptr)
 {
     SF_INFO fileInfo;
 
@@ -73,13 +73,13 @@
                 .arg(writePath);
             if (m_temp) {
                 delete m_temp;
-                m_temp = 0;
+                m_temp = nullptr;
             }
         }
     } catch (FileOperationFailed &f) {
         m_error = f.what();
-        m_temp = 0;
-        m_file = 0;
+        m_temp = nullptr;
+        m_file = nullptr;
     }
 }
 
@@ -218,12 +218,12 @@
 {
     if (m_file) {
         sf_close(m_file);
-        m_file = 0;
+        m_file = nullptr;
     }
     if (m_temp) {
         m_temp->moveToTarget();
         delete m_temp;
-        m_temp = 0;
+        m_temp = nullptr;
     }
     return true;
 }
--- a/data/midi/MIDIEvent.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/midi/MIDIEvent.h	Wed Jan 09 15:24:38 2019 +0000
@@ -19,8 +19,8 @@
    This file copyright 2000-2006 Richard Bown and Chris Cannam.
 */
 
-#ifndef _MIDI_EVENT_H_
-#define _MIDI_EVENT_H_
+#ifndef SV_MIDI_EVENT_H
+#define SV_MIDI_EVENT_H
 
 #include <QString>
 #include <string>
@@ -226,7 +226,7 @@
     }
     virtual ~MIDIException() throw() { }
 
-    virtual const char *what() const throw() {
+    const char *what() const throw() override {
         return m_message.toLocal8Bit().data();
     }
 
--- a/data/midi/MIDIInput.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/midi/MIDIInput.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -20,7 +20,7 @@
 #include "system/System.h"
 
 MIDIInput::MIDIInput(QString name, FrameTimer *timer) :
-    m_rtmidi(0),
+    m_rtmidi(nullptr),
     m_frameTimer(timer),
     m_buffer(1023)
 {
@@ -47,7 +47,7 @@
 
                 SVDEBUG << "NOTE: MIDIInput: No input ports available" << endl;
                 delete m_rtmidi;
-                m_rtmidi = 0;
+                m_rtmidi = nullptr;
 
             } else {
 
@@ -67,7 +67,7 @@
     } catch (const RtMidiError &e) {
         SVCERR << "ERROR: RtMidi error: " << e.getMessage() << endl;
         delete m_rtmidi;
-        m_rtmidi = 0;
+        m_rtmidi = nullptr;
     }
 }
 
--- a/data/midi/MIDIInput.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/midi/MIDIInput.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _MIDI_INPUT_H_
-#define _MIDI_INPUT_H_
+#ifndef SV_MIDI_INPUT_H
+#define SV_MIDI_INPUT_H
 
 #include <QObject>
 #include "MIDIEvent.h"
--- a/data/model/AggregateWaveModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/AggregateWaveModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _AGGREGATE_WAVE_MODEL_H_
-#define _AGGREGATE_WAVE_MODEL_H_
+#ifndef SV_AGGREGATE_WAVE_MODEL_H
+#define SV_AGGREGATE_WAVE_MODEL_H
 
 #include "RangeSummarisableTimeValueModel.h"
 #include "PowerOfSqrtTwoZoomConstraint.h"
@@ -39,41 +39,41 @@
     AggregateWaveModel(ChannelSpecList channelSpecs);
     ~AggregateWaveModel();
 
-    bool isOK() const;
-    bool isReady(int *) const;
+    bool isOK() const override;
+    bool isReady(int *) const override;
 
-    QString getTypeName() const { return tr("Aggregate Wave"); }
+    QString getTypeName() const override { return tr("Aggregate Wave"); }
 
     int getComponentCount() const;
     ModelChannelSpec getComponent(int c) const;
 
-    const ZoomConstraint *getZoomConstraint() const { return &m_zoomConstraint; }
+    const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; }
 
     sv_frame_t getFrameCount() const;
-    int getChannelCount() const;
-    sv_samplerate_t getSampleRate() const;
+    int getChannelCount() const override;
+    sv_samplerate_t getSampleRate() const override;
 
-    float getValueMinimum() const { return -1.0f; }
-    float getValueMaximum() const { return  1.0f; }
+    float getValueMinimum() const override { return -1.0f; }
+    float getValueMaximum() const override { return  1.0f; }
 
-    virtual sv_frame_t getStartFrame() const { return 0; }
-    virtual sv_frame_t getEndFrame() const { return getFrameCount(); }
+    sv_frame_t getStartFrame() const override { return 0; }
+    sv_frame_t getEndFrame() const override { return getFrameCount(); }
 
-    virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const;
+    floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
+    std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual int getSummaryBlockSize(int desired) const;
+    int getSummaryBlockSize(int desired) const override;
 
-    virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
+    void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
                               RangeBlock &ranges,
-                              int &blockSize) const;
+                              int &blockSize) const override;
 
-    virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const;
+    Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 signals:
     void modelChanged();
--- a/data/model/AlignmentModel.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/AlignmentModel.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -27,8 +27,8 @@
     m_aligned(aligned),
     m_inputModel(inputModel),
     m_rawPath(path),
-    m_path(0),
-    m_reversePath(0),
+    m_path(nullptr),
+    m_reversePath(nullptr),
     m_pathBegun(false),
     m_pathComplete(false)
 {
@@ -129,7 +129,7 @@
 const ZoomConstraint *
 AlignmentModel::getZoomConstraint() const
 {
-    return 0;
+    return nullptr;
 }
 
 const Model *
@@ -177,7 +177,7 @@
         cerr << "AlignmentModel: deleting raw path model" << endl;
         if (m_rawPath) m_rawPath->aboutToDelete();
         delete m_rawPath;
-        m_rawPath = 0;
+        m_rawPath = nullptr;
     }
 }
 
@@ -214,7 +214,7 @@
             
             if (m_inputModel) m_inputModel->aboutToDelete();
             delete m_inputModel;
-            m_inputModel = 0;
+            m_inputModel = nullptr;
         }
     }
 
--- a/data/model/AlignmentModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/AlignmentModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _ALIGNMENT_MODEL_H_
-#define _ALIGNMENT_MODEL_H_
+#ifndef SV_ALIGNMENT_MODEL_H
+#define SV_ALIGNMENT_MODEL_H
 
 #include "Model.h"
 #include "PathModel.h"
@@ -36,14 +36,14 @@
                    SparseTimeValueModel *path); // I take ownership
     ~AlignmentModel();
 
-    virtual bool isOK() const;
-    virtual sv_frame_t getStartFrame() const;
-    virtual sv_frame_t getEndFrame() const;
-    virtual sv_samplerate_t getSampleRate() const;
-    virtual bool isReady(int *completion = 0) const;
-    virtual const ZoomConstraint *getZoomConstraint() const;
+    bool isOK() const override;
+    sv_frame_t getStartFrame() const override;
+    sv_frame_t getEndFrame() const override;
+    sv_samplerate_t getSampleRate() const override;
+    bool isReady(int *completion = 0) const override;
+    const ZoomConstraint *getZoomConstraint() const override;
 
-    QString getTypeName() const { return tr("Alignment"); }
+    QString getTypeName() const override { return tr("Alignment"); }
 
     const Model *getReferenceModel() const;
     const Model *getAlignedModel() const;
@@ -54,9 +54,9 @@
     void setPathFrom(SparseTimeValueModel *rawpath);
     void setPath(PathModel *path);
 
-    virtual void toXml(QTextStream &stream,
+    void toXml(QTextStream &stream,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 signals:
     void modelChanged();
--- a/data/model/Dense3DModelPeakCache.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/Dense3DModelPeakCache.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -74,7 +74,7 @@
 void
 Dense3DModelPeakCache::sourceModelAboutToBeDeleted()
 {
-    m_source = 0;
+    m_source = nullptr;
 }
 
 bool
--- a/data/model/Dense3DModelPeakCache.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/Dense3DModelPeakCache.h	Wed Jan 09 15:24:38 2019 +0000
@@ -28,23 +28,23 @@
                           int columnsPerPeak);
     ~Dense3DModelPeakCache();
 
-    virtual bool isOK() const {
+    bool isOK() const override {
         return m_source && m_source->isOK(); 
     }
 
-    virtual sv_samplerate_t getSampleRate() const {
+    sv_samplerate_t getSampleRate() const override {
         return m_source->getSampleRate();
     }
 
-    virtual sv_frame_t getStartFrame() const {
+    sv_frame_t getStartFrame() const override {
         return m_source->getStartFrame();
     }
 
-    virtual sv_frame_t getEndFrame() const {
+    sv_frame_t getEndFrame() const override {
         return m_source->getEndFrame();
     }
 
-    virtual int getResolution() const {
+    int getResolution() const override {
         return m_source->getResolution() * m_columnsPerPeak;
     }
 
@@ -52,7 +52,7 @@
         return m_columnsPerPeak;
     }
     
-    virtual int getWidth() const {
+    int getWidth() const override {
         int sourceWidth = m_source->getWidth();
         if ((sourceWidth % m_columnsPerPeak) == 0) {
             return sourceWidth / m_columnsPerPeak;
@@ -61,15 +61,15 @@
         }
     }
 
-    virtual int getHeight() const {
+    int getHeight() const override {
         return m_source->getHeight();
     }
 
-    virtual float getMinimumLevel() const {
+    float getMinimumLevel() const override {
         return m_source->getMinimumLevel();
     }
 
-    virtual float getMaximumLevel() const {
+    float getMaximumLevel() const override {
         return m_source->getMaximumLevel();
     }
 
@@ -79,21 +79,21 @@
      * columns (col * getColumnsPerPeak()) to ((col+1) *
      * getColumnsPerPeak() - 1) inclusive.
      */
-    virtual Column getColumn(int col) const;
+    Column getColumn(int col) const override;
 
-    virtual float getValueAt(int col, int n) const;
+    float getValueAt(int col, int n) const override;
 
-    virtual QString getBinName(int n) const {
+    QString getBinName(int n) const override {
         return m_source->getBinName(n);
     }
 
-    virtual bool shouldUseLogValueScale() const {
+    bool shouldUseLogValueScale() const override {
         return m_source->shouldUseLogValueScale();
     }
 
-    QString getTypeName() const { return tr("Dense 3-D Peak Cache"); }
+    QString getTypeName() const override { return tr("Dense 3-D Peak Cache"); }
 
-    virtual int getCompletion() const {
+    int getCompletion() const override {
         return m_source->getCompletion();
     }
 
--- a/data/model/DenseThreeDimensionalModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/DenseThreeDimensionalModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _DENSE_THREE_DIMENSIONAL_MODEL_H_
-#define _DENSE_THREE_DIMENSIONAL_MODEL_H_
+#ifndef SV_DENSE_THREE_DIMENSIONAL_MODEL_H
+#define SV_DENSE_THREE_DIMENSIONAL_MODEL_H
 
 #include "Model.h"
 #include "TabularModel.h"
@@ -118,7 +118,7 @@
         return getValueAt(x, y) > threshold;
     }
 
-    QString getTypeName() const { return tr("Dense 3-D"); }
+    QString getTypeName() const override { return tr("Dense 3-D"); }
 
     virtual int getCompletion() const = 0;
 
@@ -129,10 +129,10 @@
        "on its side").
      */
     
-    virtual int getRowCount() const { return getWidth(); }
-    virtual int getColumnCount() const { return getHeight() + 2; }
+    int getRowCount() const override { return getWidth(); }
+    int getColumnCount() const override { return getHeight() + 2; }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -146,8 +146,8 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int) const 
-    {
+    QVariant getData(int row, int column, int) const 
+    override {
         switch (column) {
         case 0: {
             RealTime rt = RealTime::frame2RealTime
@@ -161,17 +161,17 @@
         }
     }
 
-    virtual bool isColumnTimeValue(int col) const {
+    bool isColumnTimeValue(int col) const override {
         return col < 2;
     }
-    virtual SortType getSortType(int) const {
+    SortType getSortType(int) const override {
         return SortNumeric;
     }
 
-    virtual sv_frame_t getFrameForRow(int row) const {
+    sv_frame_t getFrameForRow(int row) const override {
         return sv_frame_t(row) * getResolution() + getStartFrame();
     }
-    virtual int getRowForFrame(sv_frame_t frame) const {
+    int getRowForFrame(sv_frame_t frame) const override {
         return int((frame - getStartFrame()) / getResolution());
     }
 
--- a/data/model/DenseTimeValueModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/DenseTimeValueModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -79,14 +79,13 @@
                                                         sv_frame_t count)
         const = 0;
 
-    virtual bool canPlay() const { return true; }
-    virtual QString getDefaultPlayClipId() const { return ""; }
+    bool canPlay() const override { return true; }
+    QString getDefaultPlayClipId() const override { return ""; }
 
-    virtual QString toDelimitedDataStringSubset(QString delimiter,
-                                                sv_frame_t f0, sv_frame_t f1)
-        const;
+    QString toDelimitedDataStringSubset(QString delimiter,
+                                        sv_frame_t f0, sv_frame_t f1) const override;
 
-    QString getTypeName() const { return tr("Dense Time-Value"); }
+    QString getTypeName() const override { return tr("Dense Time-Value"); }
 };
 
 #endif
--- a/data/model/EditableDenseThreeDimensionalModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/EditableDenseThreeDimensionalModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H_
-#define _EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H_
+#ifndef SV_EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H
+#define SV_EDITABLE_DENSE_THREE_DIMENSIONAL_MODEL_H
 
 #include "DenseThreeDimensionalModel.h"
 
@@ -48,11 +48,11 @@
                                        CompressionType compression,
                                        bool notifyOnAdd = true);
 
-    virtual bool isOK() const;
+    bool isOK() const override;
 
-    virtual sv_samplerate_t getSampleRate() const;
-    virtual sv_frame_t getStartFrame() const;
-    virtual sv_frame_t getEndFrame() const;
+    sv_samplerate_t getSampleRate() const override;
+    sv_frame_t getStartFrame() const override;
+    sv_frame_t getEndFrame() const override;
 
     /**
      * Set the frame offset of the first column.
@@ -62,7 +62,7 @@
     /**
      * Return the number of sample frames covered by each set of bins.
      */
-    virtual int getResolution() const;
+    int getResolution() const override;
 
     /**
      * Set the number of sample frames covered by each set of bins.
@@ -72,12 +72,12 @@
     /**
      * Return the number of columns.
      */
-    virtual int getWidth() const;
+    int getWidth() const override;
 
     /**
      * Return the number of bins in each column.
      */
-    virtual int getHeight() const; 
+    int getHeight() const override;
 
     /**
      * Set the number of bins in each column.
@@ -94,7 +94,7 @@
     /**
      * Return the minimum value of the value in each bin.
      */
-    virtual float getMinimumLevel() const;
+    float getMinimumLevel() const override;
 
     /**
      * Set the minimum value of the value in a bin.
@@ -104,7 +104,7 @@
     /**
      * Return the maximum value of the value in each bin.
      */
-    virtual float getMaximumLevel() const;
+    float getMaximumLevel() const override;
 
     /**
      * Set the maximum value of the value in a bin.
@@ -114,12 +114,12 @@
     /**
      * Get the set of bin values at the given column.
      */
-    virtual Column getColumn(int x) const;
+    Column getColumn(int x) const override;
 
     /**
      * Get a single value, from the n'th bin of the given column.
      */
-    virtual float getValueAt(int x, int n) const;
+    float getValueAt(int x, int n) const override;
 
     /**
      * Set the entire set of bin values at the given column.
@@ -130,7 +130,7 @@
      * Return the name of bin n. This is a single label per bin that
      * does not vary from one column to the next.
      */
-    virtual QString getBinName(int n) const;
+    QString getBinName(int n) const override;
 
     /**
      * Set the name of bin n.
@@ -148,14 +148,14 @@
      * numbers from them.) If this returns true, getBinValue() may be
      * used to retrieve the values.
      */
-    virtual bool hasBinValues() const;
+    bool hasBinValues() const override;
 
     /**
      * Return the value of bin n, if any. This is a "vertical scale"
      * value which does not vary from one column to the next. This is
      * only meaningful if hasBinValues() returns true.
      */
-    virtual float getBinValue(int n) const;
+    float getBinValue(int n) const override;
 
     /**
      * Set the values of all bins (separate from their labels). These
@@ -168,7 +168,7 @@
      * Obtain the name of the unit of the values returned from
      * getBinValue(), if any.
      */
-    virtual QString getBinValueUnit() const;
+    QString getBinValueUnit() const override;
 
     /**
      * Set the name of the unit of the values return from
@@ -181,19 +181,19 @@
      * as to suggest a log scale (mapping to colour etc) may be better
      * than a linear one.
      */
-    bool shouldUseLogValueScale() const;
+    bool shouldUseLogValueScale() const override;
 
     virtual void setCompletion(int completion, bool update = true);
-    virtual int getCompletion() const { return m_completion; }
+    int getCompletion() const override { return m_completion; }
 
-    QString getTypeName() const { return tr("Editable Dense 3-D"); }
+    QString getTypeName() const override { return tr("Editable Dense 3-D"); }
 
-    virtual QString toDelimitedDataString(QString delimiter) const;
-    virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const;
+    QString toDelimitedDataString(QString delimiter) const override;
+    QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const override;
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 protected:
     typedef std::vector<Column> ValueMatrix;
--- a/data/model/FFTModel.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/FFTModel.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -75,7 +75,7 @@
 {
     if (m_model) {
         SVDEBUG << "FFTModel[" << this << "]::sourceModelAboutToBeDeleted(" << m_model << ")" << endl;
-        m_model = 0;
+        m_model = nullptr;
     }
 }
 
--- a/data/model/FFTModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/FFTModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -60,26 +60,26 @@
 
     // DenseThreeDimensionalModel and Model methods:
     //
-    virtual int getWidth() const;
-    virtual int getHeight() const;
-    virtual float getValueAt(int x, int y) const { return getMagnitudeAt(x, y); }
-    virtual bool isOK() const { return m_model && m_model->isOK(); }
-    virtual sv_frame_t getStartFrame() const { return 0; }
-    virtual sv_frame_t getEndFrame() const {
+    int getWidth() const override;
+    int getHeight() const override;
+    float getValueAt(int x, int y) const override { return getMagnitudeAt(x, y); }
+    bool isOK() const override { return m_model && m_model->isOK(); }
+    sv_frame_t getStartFrame() const override { return 0; }
+    sv_frame_t getEndFrame() const override {
         return sv_frame_t(getWidth()) * getResolution() + getResolution();
     }
-    virtual sv_samplerate_t getSampleRate() const {
+    sv_samplerate_t getSampleRate() const override {
         return isOK() ? m_model->getSampleRate() : 0;
     }
-    virtual int getResolution() const { return m_windowIncrement; }
+    int getResolution() const override { return m_windowIncrement; }
     virtual int getYBinCount() const { return getHeight(); }
-    virtual float getMinimumLevel() const { return 0.f; } // Can't provide
-    virtual float getMaximumLevel() const { return 1.f; } // Can't provide
-    virtual Column getColumn(int x) const; // magnitudes
+    float getMinimumLevel() const override { return 0.f; } // Can't provide
+    float getMaximumLevel() const override { return 1.f; } // Can't provide
+    Column getColumn(int x) const override; // magnitudes
     virtual Column getPhases(int x) const;
-    virtual QString getBinName(int n) const;
-    virtual bool shouldUseLogValueScale() const { return true; }
-    virtual int getCompletion() const {
+    QString getBinName(int n) const override;
+    bool shouldUseLogValueScale() const override { return true; }
+    int getCompletion() const override {
         int c = 100;
         if (m_model) {
             if (m_model->isReady(&c)) return 100;
@@ -137,7 +137,7 @@
     virtual PeakSet getPeakFrequencies(PeakPickType type, int x,
                                        int ymin = 0, int ymax = 0) const;
 
-    QString getTypeName() const { return tr("FFT"); }
+    QString getTypeName() const override { return tr("FFT"); }
 
 public slots:
     void sourceModelAboutToBeDeleted();
--- a/data/model/FlexiNoteModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/FlexiNoteModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FLEXINOTE_MODEL_H_
-#define _FLEXINOTE_MODEL_H_
+#ifndef SV_FLEXINOTE_MODEL_H
+#define SV_FLEXINOTE_MODEL_H
 
 #include "IntervalModel.h"
 #include "NoteData.h"
@@ -130,21 +130,21 @@
 
     float getValueQuantization() const { return m_valueQuantization; }
     void setValueQuantization(float q) { m_valueQuantization = q; }
-    float getValueMinimum() const { return 33; }
-    float getValueMaximum() const { return 88; }
+    float getValueMinimum() const override { return 33; }
+    float getValueMaximum() const override { return 88; }
 
-    QString getTypeName() const { return tr("FlexiNote"); }
+    QString getTypeName() const override { return tr("FlexiNote"); }
 
-    virtual bool canPlay() const { return true; }
+    bool canPlay() const override { return true; }
 
-    virtual QString getDefaultPlayClipId() const
+    QString getDefaultPlayClipId() const override
     {
         return "elecpiano";
     }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         std::cerr << "FlexiNoteModel::toXml: extraAttributes = \"" 
                   << extraAttributes.toStdString() << std::endl;
@@ -160,12 +160,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 6;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -178,7 +178,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 4) {
             return IntervalModel<FlexiNote>::getData(row, column, role);
@@ -194,7 +194,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 4) {
             return IntervalModel<FlexiNote>::getSetDataCommand
@@ -218,7 +218,7 @@
         return command->finish();
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 5) return SortAlphabetical;
         return SortNumeric;
@@ -229,12 +229,12 @@
      */
 
     NoteList getNotes() const 
-    {
+    override {
         return getNotesWithin(getStartFrame(), getEndFrame());
     }
 
     NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const 
-    {    
+    override {    
             PointList points = getPoints(startFrame, endFrame);
         NoteList notes;
         for (PointList::iterator pli = points.begin(); pli != points.end(); ++pli) {
--- a/data/model/ImageModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/ImageModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _IMAGE_MODEL_H_
-#define _IMAGE_MODEL_H_
+#ifndef SV_IMAGE_MODEL_H
+#define SV_IMAGE_MODEL_H
 
 #include "SparseModel.h"
 #include "base/XmlExportable.h"
@@ -45,7 +45,7 @@
     
     void toXml(QTextStream &stream,
                QString indent = "",
-               QString extraAttributes = "") const
+               QString extraAttributes = "") const override
     {
         stream <<
             QString("%1<point frame=\"%2\" image=\"%3\" label=\"%4\" %5/>\n")
@@ -93,11 +93,11 @@
         SparseModel<ImagePoint>(sampleRate, resolution, notifyOnAdd)
     { }
 
-    QString getTypeName() const { return tr("Image"); }
+    QString getTypeName() const override { return tr("Image"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         SparseModel<ImagePoint>::toXml
             (out, 
@@ -121,15 +121,15 @@
             m_newPoint.label = newLabel;
         }
 
-        virtual QString getName() const { return tr("Edit Image"); }
+        QString getName() const override { return tr("Edit Image"); }
 
-        virtual void execute() { 
+        void execute() override { 
             m_model->deletePoint(m_oldPoint);
             m_model->addPoint(m_newPoint);
             std::swap(m_oldPoint, m_newPoint);
         }
 
-        virtual void unexecute() { execute(); }
+        void unexecute() override { execute(); }
 
     private:
         ImageModel *m_model;
@@ -141,12 +141,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 4;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -157,7 +157,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseModel<ImagePoint>::getData
@@ -174,7 +174,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseModel<ImagePoint>::getSetDataCommand
@@ -198,12 +198,12 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column > 2) return SortAlphabetical;
         return SortNumeric;
--- a/data/model/IntervalModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/IntervalModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _INTERVAL_MODEL_H_
-#define _INTERVAL_MODEL_H_
+#ifndef SV_INTERVAL_MODEL_H
+#define SV_INTERVAL_MODEL_H
 
 #include "SparseValueModel.h"
 #include "base/RealTime.h"
@@ -57,7 +57,7 @@
      */
     virtual typename SparseValueModel<PointType>::PointList getPoints(sv_frame_t frame) const;
 
-    virtual const typename SparseModel<PointType>::PointList &getPoints() const {
+    const typename SparseModel<PointType>::PointList &getPoints() const override {
         return SparseModel<PointType>::getPoints(); 
     }
 
@@ -65,7 +65,7 @@
      * TabularModel methods.  
      */
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseValueModel<PointType>::getData
@@ -86,7 +86,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         typedef IntervalModel<PointType> I;
 
@@ -115,7 +115,7 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         // NB duration is not a "time value" -- that's for columns
         // whose sort ordering is exactly that of the frame time
--- a/data/model/Labeller.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/Labeller.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _LABELLER_H_
-#define _LABELLER_H_
+#ifndef SV_LABELLER_H
+#define SV_LABELLER_H
 
 #include "SparseModel.h"
 #include "SparseValueModel.h"
--- a/data/model/Model.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/Model.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -94,7 +94,7 @@
 void
 Model::sourceModelAboutToBeDeleted()
 {
-    m_sourceModel = 0;
+    m_sourceModel = nullptr;
 }
 
 void
@@ -124,7 +124,7 @@
 {
     if (!m_alignment) {
         if (m_sourceModel) return m_sourceModel->getAlignmentReference();
-        return 0;
+        return nullptr;
     }
     return m_alignment->getReferenceModel();
 }
--- a/data/model/Model.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/Model.h	Wed Jan 09 15:24:38 2019 +0000
@@ -232,9 +232,9 @@
      */
     QString getRDFTypeURI() const { return m_typeUri; }
 
-    virtual void toXml(QTextStream &stream,
+    void toXml(QTextStream &stream,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
     virtual QString toDelimitedDataString(QString delimiter) const {
         return toDelimitedDataStringSubset
--- a/data/model/ModelDataTableModel.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/ModelDataTableModel.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -122,7 +122,7 @@
 QModelIndex
 ModelDataTableModel::index(int row, int column, const QModelIndex &) const
 {
-    return createIndex(row, column, (void *)0);
+    return createIndex(row, column, (void *)nullptr);
 }
 
 QModelIndex
@@ -153,7 +153,7 @@
 {
     if (!m_model) return createIndex(0, 0);
     int row = m_model->getRowForFrame(frame);
-    return createIndex(getSorted(row), 0, (void *)0);
+    return createIndex(getSorted(row), 0, (void *)nullptr);
 }
 
 sv_frame_t
@@ -200,7 +200,7 @@
     int current = getCurrentRow();
     if (current != prevCurrent) {
 //         cerr << "Current row changed from " << prevCurrent << " to " << current << " for underlying row " << m_currentRow << endl;
-        emit currentChanged(createIndex(current, 0, (void *)0));
+        emit currentChanged(createIndex(current, 0, (void *)nullptr));
     }
     emit layoutChanged();
 }
@@ -232,10 +232,10 @@
     int row0 = ix0.row();
     int row1 = ix1.row();
     if (row0 > 0) {
-        ix0 = createIndex(row0 - 1, ix0.column(), (void *)0);
+        ix0 = createIndex(row0 - 1, ix0.column(), (void *)nullptr);
     }
     if (row1 + 1 < rowCount()) {
-        ix1 = createIndex(row1 + 1, ix1.column(), (void *)0);
+        ix1 = createIndex(row1 + 1, ix1.column(), (void *)nullptr);
     }
     SVDEBUG << "emitting dataChanged from row " << ix0.row() << " to " << ix1.row() << endl;
     emit dataChanged(ix0, ix1);
@@ -246,7 +246,7 @@
 void
 ModelDataTableModel::modelAboutToBeDeleted()
 {
-    m_model = 0;
+    m_model = nullptr;
     emit modelRemoved();
 }
 
--- a/data/model/ModelDataTableModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/ModelDataTableModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -33,30 +33,30 @@
     ModelDataTableModel(TabularModel *m);
     virtual ~ModelDataTableModel();
 
-    QVariant data(const QModelIndex &index, int role) const;
+    QVariant data(const QModelIndex &index, int role) const override;
 
-    bool setData(const QModelIndex &index, const QVariant &value, int role);
+    bool setData(const QModelIndex &index, const QVariant &value, int role) override;
 
     bool insertRow(int row, const QModelIndex &parent = QModelIndex());
     bool removeRow(int row, const QModelIndex &parent = QModelIndex());
 
-    Qt::ItemFlags flags(const QModelIndex &index) const;
+    Qt::ItemFlags flags(const QModelIndex &index) const override;
 
     QVariant headerData(int section, Qt::Orientation orientation,
-                        int role = Qt::DisplayRole) const;
+                        int role = Qt::DisplayRole) const override;
 
     QModelIndex index(int row, int column,
-                      const QModelIndex &parent = QModelIndex()) const;
+                      const QModelIndex &parent = QModelIndex()) const override;
 
-    QModelIndex parent(const QModelIndex &index) const;
+    QModelIndex parent(const QModelIndex &index) const override;
 
-    int rowCount(const QModelIndex &parent = QModelIndex()) const;
-    int columnCount(const QModelIndex &parent = QModelIndex()) const;
+    int rowCount(const QModelIndex &parent = QModelIndex()) const override;
+    int columnCount(const QModelIndex &parent = QModelIndex()) const override;
 
     QModelIndex getModelIndexForFrame(sv_frame_t frame) const;
     sv_frame_t getFrameForModelIndex(const QModelIndex &) const;
 
-    void sort(int column, Qt::SortOrder order = Qt::AscendingOrder);
+    void sort(int column, Qt::SortOrder order = Qt::AscendingOrder) override;
 
     QModelIndex findText(QString text) const;
 
--- a/data/model/NoteModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/NoteModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -126,18 +126,18 @@
     float getValueQuantization() const { return m_valueQuantization; }
     void setValueQuantization(float q) { m_valueQuantization = q; }
 
-    QString getTypeName() const { return tr("Note"); }
+    QString getTypeName() const override { return tr("Note"); }
 
-    virtual bool canPlay() const { return true; }
+    bool canPlay() const override { return true; }
 
-    virtual QString getDefaultPlayClipId() const
+    QString getDefaultPlayClipId() const override
     {
         return "elecpiano";
     }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         std::cerr << "NoteModel::toXml: extraAttributes = \"" 
                   << extraAttributes.toStdString() << std::endl;
@@ -153,12 +153,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 6;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -171,7 +171,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 4) {
             return IntervalModel<Note>::getData(row, column, role);
@@ -187,7 +187,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 4) {
             return IntervalModel<Note>::getSetDataCommand
@@ -211,7 +211,7 @@
         return command->finish();
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 5) return SortAlphabetical;
         return SortNumeric;
@@ -221,11 +221,11 @@
      * NoteExportable methods.
      */
 
-    NoteList getNotes() const {
+    NoteList getNotes() const override {
         return getNotesWithin(getStartFrame(), getEndFrame());
     }
 
-    NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const {
+    NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const override {
         
         PointList points = getPoints(startFrame, endFrame);
         NoteList notes;
--- a/data/model/PathModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/PathModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PATH_MODEL_H_
-#define _PATH_MODEL_H_
+#ifndef SV_PATH_MODEL_H
+#define SV_PATH_MODEL_H
 
 #include "Model.h"
 #include "SparseModel.h"
@@ -71,9 +71,9 @@
     PathModel(sv_samplerate_t sampleRate, int resolution, bool notify = true) :
         SparseModel<PathPoint>(sampleRate, resolution, notify) { }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         SparseModel<PathPoint>::toXml
             (out, 
@@ -85,9 +85,9 @@
     /**
      * TabularModel is inherited via SparseModel, but we don't need it here.
      */
-    virtual QString getHeading(int) const { return ""; }
-    virtual bool isColumnTimeValue(int) const { return false; }
-    virtual SortType getSortType(int) const { return SortNumeric; }
+    QString getHeading(int) const override { return ""; }
+    bool isColumnTimeValue(int) const override { return false; }
+    SortType getSortType(int) const override { return SortNumeric; }
 
 };
 
--- a/data/model/RangeSummarisableTimeValueModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/RangeSummarisableTimeValueModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -98,7 +98,7 @@
 
     virtual int getSummaryBlockSize(int desired) const = 0;
 
-    QString getTypeName() const { return tr("Range-Summarisable Time-Value"); }
+    QString getTypeName() const override { return tr("Range-Summarisable Time-Value"); }
 };
 
 #endif
--- a/data/model/ReadOnlyWaveFileModel.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/ReadOnlyWaveFileModel.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -42,11 +42,11 @@
 ReadOnlyWaveFileModel::ReadOnlyWaveFileModel(FileSource source, sv_samplerate_t targetRate) :
     m_source(source),
     m_path(source.getLocation()),
-    m_reader(0),
+    m_reader(nullptr),
     m_myReader(true),
     m_startFrame(0),
-    m_fillThread(0),
-    m_updateTimer(0),
+    m_fillThread(nullptr),
+    m_updateTimer(nullptr),
     m_lastFillExtent(0),
     m_prevCompletion(0),
     m_exiting(false),
@@ -90,11 +90,11 @@
 ReadOnlyWaveFileModel::ReadOnlyWaveFileModel(FileSource source, AudioFileReader *reader) :
     m_source(source),
     m_path(source.getLocation()),
-    m_reader(0),
+    m_reader(nullptr),
     m_myReader(false),
     m_startFrame(0),
-    m_fillThread(0),
-    m_updateTimer(0),
+    m_fillThread(nullptr),
+    m_updateTimer(nullptr),
     m_lastFillExtent(0),
     m_prevCompletion(0),
     m_exiting(false)
@@ -113,7 +113,7 @@
     m_exiting = true;
     if (m_fillThread) m_fillThread->wait();
     if (m_myReader) delete m_reader;
-    m_reader = 0;
+    m_reader = nullptr;
 
     SVDEBUG << "ReadOnlyWaveFileModel: Destructor exiting; we had caches of "
             << (m_cache[0].size() * sizeof(Range)) << " and "
@@ -597,9 +597,9 @@
 {
     m_mutex.lock();
     delete m_fillThread;
-    m_fillThread = 0;
+    m_fillThread = nullptr;
     delete m_updateTimer;
-    m_updateTimer = 0;
+    m_updateTimer = nullptr;
     auto prevFillExtent = m_lastFillExtent;
     m_lastFillExtent = getEndFrame();
     m_mutex.unlock();
--- a/data/model/ReadOnlyWaveFileModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/ReadOnlyWaveFileModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -52,47 +52,47 @@
     
     ~ReadOnlyWaveFileModel();
 
-    bool isOK() const;
-    bool isReady(int *) const;
+    bool isOK() const override;
+    bool isReady(int *) const override;
 
-    const ZoomConstraint *getZoomConstraint() const { return &m_zoomConstraint; }
+    const ZoomConstraint *getZoomConstraint() const override { return &m_zoomConstraint; }
 
-    sv_frame_t getFrameCount() const;
-    int getChannelCount() const;
-    sv_samplerate_t getSampleRate() const;
-    sv_samplerate_t getNativeRate() const;
+    sv_frame_t getFrameCount() const override;
+    int getChannelCount() const override;
+    sv_samplerate_t getSampleRate() const override;
+    sv_samplerate_t getNativeRate() const override;
 
-    QString getTitle() const;
-    QString getMaker() const;
-    QString getLocation() const;
+    QString getTitle() const override;
+    QString getMaker() const override;
+    QString getLocation() const override;
 
     QString getLocalFilename() const;
 
-    float getValueMinimum() const { return -1.0f; }
-    float getValueMaximum() const { return  1.0f; }
+    float getValueMinimum() const override { return -1.0f; }
+    float getValueMaximum() const override { return  1.0f; }
 
-    virtual sv_frame_t getStartFrame() const { return m_startFrame; }
-    virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); }
+    sv_frame_t getStartFrame() const override { return m_startFrame; }
+    sv_frame_t getEndFrame() const override { return m_startFrame + getFrameCount(); }
 
-    void setStartFrame(sv_frame_t startFrame) { m_startFrame = startFrame; }
+    void setStartFrame(sv_frame_t startFrame) override { m_startFrame = startFrame; }
 
-    virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const;
+    floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
+    std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual int getSummaryBlockSize(int desired) const;
+    int getSummaryBlockSize(int desired) const override;
 
-    virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
+    void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
                               RangeBlock &ranges,
-                              int &blockSize) const;
+                              int &blockSize) const override;
 
-    virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const;
+    Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    QString getTypeName() const { return tr("Wave File"); }
+    QString getTypeName() const override { return tr("Wave File"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 protected slots:
     void fillTimerTimedOut();
@@ -109,7 +109,7 @@
             m_frameCount(model.getFrameCount()) { }
     
         sv_frame_t getFillExtent() const { return m_fillExtent; }
-        virtual void run();
+        void run() override;
 
     protected:
         ReadOnlyWaveFileModel &m_model;
--- a/data/model/RegionModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/RegionModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _REGION_MODEL_H_
-#define _REGION_MODEL_H_
+#ifndef SV_REGION_MODEL_H
+#define SV_REGION_MODEL_H
 
 #include "IntervalModel.h"
 #include "base/RealTime.h"
@@ -122,11 +122,11 @@
 
     bool haveDistinctValues() const { return m_haveDistinctValues; }
 
-    QString getTypeName() const { return tr("Region"); }
+    QString getTypeName() const override { return tr("Region"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         std::cerr << "RegionModel::toXml: extraAttributes = \"" 
                   << extraAttributes.toStdString() << std::endl;
@@ -142,12 +142,12 @@
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 5;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -159,7 +159,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 4) {
             return IntervalModel<RegionRec>::getData(row, column, role);
@@ -174,7 +174,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 4) {
             return IntervalModel<RegionRec>::getSetDataCommand
@@ -197,13 +197,13 @@
         return command->finish();
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 4) return SortAlphabetical;
         return SortNumeric;
     }
 
-    virtual void addPoint(const Point &point)
+    void addPoint(const Point &point) override
     {
         if (point.value != 0.f) m_haveDistinctValues = true;
         IntervalModel<RegionRec>::addPoint(point);
--- a/data/model/SparseModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/SparseModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -55,10 +55,10 @@
                 bool notifyOnAdd = true);
     virtual ~SparseModel() { }
     
-    virtual bool isOK() const { return true; }
+    bool isOK() const override { return true; }
     virtual sv_frame_t getStartFrame() const;
     virtual sv_frame_t getEndFrame() const;
-    virtual sv_samplerate_t getSampleRate() const { return m_sampleRate; }
+    sv_samplerate_t getSampleRate() const override { return m_sampleRate; }
 
     // Number of frames of the underlying sample rate that this model
     // is capable of resolving to.  For example, if m_resolution == 10
@@ -147,7 +147,7 @@
      */
     virtual bool containsPoint(const PointType &point);
     
-    virtual bool isReady(int *completion = 0) const {
+    bool isReady(int *completion = 0) const override {
         bool ready = isOK() && (m_completion == 100);
         if (completion) *completion = m_completion;
         return ready;
@@ -158,9 +158,9 @@
 
     virtual bool hasTextLabels() const { return m_hasTextLabels; }
 
-    virtual bool isSparse() const { return true; }
+    bool isSparse() const override { return true; }
 
-    QString getTypeName() const { return tr("Sparse"); }
+    QString getTypeName() const override { return tr("Sparse"); }
 
     virtual QString getXmlOutputType() const { return "sparse"; }
 
@@ -168,24 +168,24 @@
                        QString indent = "",
                        QString extraAttributes = "") const;
 
-    virtual QString toDelimitedDataString(QString delimiter) const {
+    QString toDelimitedDataString(QString delimiter) const override {
         return toDelimitedDataStringWithOptions
             (delimiter, DataExportDefaults);
     }
 
-    virtual QString toDelimitedDataStringWithOptions(QString delimiter,
-                                                     DataExportOptions opts) const {
+    QString toDelimitedDataStringWithOptions(QString delimiter,
+                                                     DataExportOptions opts) const override {
         return toDelimitedDataStringSubsetWithOptions
             (delimiter, opts,
              std::min(getStartFrame(), sv_frame_t(0)), getEndFrame());
     }
 
-    virtual QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const {
+    QString toDelimitedDataStringSubset(QString delimiter, sv_frame_t f0, sv_frame_t f1) const override {
         return toDelimitedDataStringSubsetWithOptions
             (delimiter, DataExportDefaults, f0, f1);
     }
 
-    virtual QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions opts, sv_frame_t f0, sv_frame_t f1) const {
+    QString toDelimitedDataStringSubsetWithOptions(QString delimiter, DataExportOptions opts, sv_frame_t f0, sv_frame_t f1) const override {
         if (opts & DataExportFillGaps) {
             return toDelimitedDataStringSubsetFilled(delimiter, opts, f0, f1);
         } else {
@@ -210,12 +210,12 @@
                         QString name = "") :
             m_model(model), m_point(point), m_name(name) { }
 
-        virtual QString getName() const {
+        QString getName() const override {
             return (m_name == "" ? tr("Add Point") : m_name);
         }
 
-        virtual void execute() { m_model->addPoint(m_point); }
-        virtual void unexecute() { m_model->deletePoint(m_point); }
+        void execute() override { m_model->addPoint(m_point); }
+        void unexecute() override { m_model->deletePoint(m_point); }
 
         const PointType &getPoint() const { return m_point; }
 
@@ -236,10 +236,10 @@
                            const PointType &point) :
             m_model(model), m_point(point) { }
 
-        virtual QString getName() const { return tr("Delete Point"); }
+        QString getName() const override { return tr("Delete Point"); }
 
-        virtual void execute() { m_model->deletePoint(m_point); }
-        virtual void unexecute() { m_model->addPoint(m_point); }
+        void execute() override { m_model->deletePoint(m_point); }
+        void unexecute() override { m_model->addPoint(m_point); }
 
         const PointType &getPoint() const { return m_point; }
 
@@ -264,7 +264,7 @@
         /**
          * Stack an arbitrary other command in the same sequence.
          */
-        virtual void addCommand(Command *command) { addCommand(command, true); }
+        void addCommand(Command *command) override { addCommand(command, true); }
 
         /**
          * If any points have been added or deleted, return this
@@ -293,15 +293,15 @@
             m_newPoint.label = newLabel;
         }
 
-        virtual QString getName() const { return tr("Re-Label Point"); }
+        QString getName() const override { return tr("Re-Label Point"); }
 
-        virtual void execute() { 
+        void execute() override { 
             m_model->deletePoint(m_oldPoint);
             m_model->addPoint(m_newPoint);
             std::swap(m_oldPoint, m_newPoint);
         }
 
-        virtual void unexecute() { execute(); }
+        void unexecute() override { execute(); }
 
     private:
         SparseModel<PointType> *m_model;
@@ -313,19 +313,19 @@
      * TabularModel methods.  
      */
 
-    virtual int getRowCount() const
+    int getRowCount() const override
     {
         return int(m_points.size());
     }
 
-    virtual sv_frame_t getFrameForRow(int row) const
+    sv_frame_t getFrameForRow(int row) const override
     {
         PointListConstIterator i = getPointListIteratorForRow(row);
         if (i == m_points.end()) return 0;
         return i->frame;
     }
 
-    virtual int getRowForFrame(sv_frame_t frame) const
+    int getRowForFrame(sv_frame_t frame) const override
     {
         if (m_rows.empty()) rebuildRowVector();
         std::vector<sv_frame_t>::iterator i =
@@ -337,8 +337,8 @@
         return int(row);
     }
 
-    virtual int getColumnCount() const { return 1; }
-    virtual QVariant getData(int row, int column, int role) const
+    int getColumnCount() const override { return 1; }
+    QVariant getData(int row, int column, int role) const override
     {
         PointListConstIterator i = getPointListIteratorForRow(row);
         if (i == m_points.end()) {
@@ -361,8 +361,8 @@
         return QVariant();
     }
 
-    virtual Command *getSetDataCommand(int row, int column,
-                                       const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column,
+                               const QVariant &value, int role) override
     {
         if (role != Qt::EditRole) return 0;
         PointListIterator i = getPointListIteratorForRow(row);
@@ -381,7 +381,7 @@
         return command->finish();
     }
 
-    virtual Command *getInsertRowCommand(int row)
+    Command *getInsertRowCommand(int row) override
     {
         EditCommand *command = new EditCommand(this, tr("Insert Data Point"));
         Point point(0);
@@ -392,7 +392,7 @@
         return command->finish();
     }
             
-    virtual Command *getRemoveRowCommand(int row)
+    Command *getRemoveRowCommand(int row) override
     {
         PointListIterator i = getPointListIteratorForRow(row);
         if (i == m_points.end()) return 0;
--- a/data/model/SparseOneDimensionalModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/SparseOneDimensionalModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SPARSE_ONE_DIMENSIONAL_MODEL_H_
-#define _SPARSE_ONE_DIMENSIONAL_MODEL_H_
+#ifndef SV_SPARSE_ONE_DIMENSIONAL_MODEL_H
+#define SV_SPARSE_ONE_DIMENSIONAL_MODEL_H
 
 #include "SparseModel.h"
 #include "NoteData.h"
@@ -88,9 +88,9 @@
         PlayParameterRepository::getInstance()->removePlayable(this);
     }
 
-    virtual bool canPlay() const { return true; }
+    bool canPlay() const override { return true; }
 
-    virtual QString getDefaultPlayClipId() const
+    QString getDefaultPlayClipId() const override
     {
         return "tap";
     }
@@ -107,18 +107,18 @@
         return -1;
     }
 
-    QString getTypeName() const { return tr("Sparse 1-D"); }
+    QString getTypeName() const override { return tr("Sparse 1-D"); }
 
     /**
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 3;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -128,7 +128,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseModel<OneDimensionalPoint>::getData
@@ -144,7 +144,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseModel<OneDimensionalPoint>::getSetDataCommand
@@ -168,12 +168,12 @@
     }
 
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 2) return SortAlphabetical;
         return SortNumeric;
@@ -183,11 +183,11 @@
      * NoteExportable methods.
      */
 
-    NoteList getNotes() const {
+    NoteList getNotes() const override {
         return getNotesWithin(getStartFrame(), getEndFrame());
     }
 
-    NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const {
+    NoteList getNotesWithin(sv_frame_t startFrame, sv_frame_t endFrame) const override {
         
         PointList points = getPoints(startFrame, endFrame);
         NoteList notes;
--- a/data/model/SparseTimeValueModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/SparseTimeValueModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SPARSE_TIME_VALUE_MODEL_H_
-#define _SPARSE_TIME_VALUE_MODEL_H_
+#ifndef SV_SPARSE_TIME_VALUE_MODEL_H
+#define SV_SPARSE_TIME_VALUE_MODEL_H
 
 #include "SparseValueModel.h"
 #include "base/PlayParameterRepository.h"
@@ -108,21 +108,21 @@
         PlayParameterRepository::getInstance()->removePlayable(this);
     }
 
-    QString getTypeName() const { return tr("Sparse Time-Value"); }
+    QString getTypeName() const override { return tr("Sparse Time-Value"); }
 
-    virtual bool canPlay() const { return true; }
-    virtual bool getDefaultPlayAudible() const { return false; } // user must unmute
+    bool canPlay() const override { return true; }
+    bool getDefaultPlayAudible() const override { return false; } // user must unmute
 
     /**
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 4;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -133,7 +133,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseValueModel<TimeValuePoint>::getData
@@ -152,7 +152,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseValueModel<TimeValuePoint>::getSetDataCommand
@@ -176,12 +176,12 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 3) return SortAlphabetical;
         return SortNumeric;
--- a/data/model/SparseValueModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/SparseValueModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SPARSE_VALUE_MODEL_H_
-#define _SPARSE_VALUE_MODEL_H_
+#ifndef SV_SPARSE_VALUE_MODEL_H
+#define SV_SPARSE_VALUE_MODEL_H
 
 #include "SparseModel.h"
 #include "base/UnitDatabase.h"
@@ -53,7 +53,7 @@
     using SparseModel<PointType>::getPoints;
     using SparseModel<PointType>::tr;
 
-    QString getTypeName() const { return tr("Sparse Value"); }
+    QString getTypeName() const override { return tr("Sparse Value"); }
 
     virtual float getValueMinimum() const { return m_valueMinimum; }
     virtual float getValueMaximum() const { return m_valueMaximum; }
@@ -64,7 +64,7 @@
         UnitDatabase::getInstance()->registerUnit(units);
     }
 
-    virtual void addPoint(const PointType &point)
+    void addPoint(const PointType &point) override
     {
         bool allChange = false;
 
@@ -84,7 +84,7 @@
         if (allChange) emit modelChanged();
     }
 
-    virtual void deletePoint(const PointType &point)
+    void deletePoint(const PointType &point) override
     {
         SparseModel<PointType>::deletePoint(point);
 
@@ -113,9 +113,9 @@
         }
     }
 
-    virtual void toXml(QTextStream &stream,
+    void toXml(QTextStream &stream,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         std::cerr << "SparseValueModel::toXml: extraAttributes = \"" 
                   << extraAttributes.toStdString() << std::endl;
--- a/data/model/TabularModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/TabularModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TABULAR_MODEL_H_
-#define _TABULAR_MODEL_H_
+#ifndef SV_TABULAR_MODEL_H
+#define SV_TABULAR_MODEL_H
 
 #include <QVariant>
 #include <QString>
--- a/data/model/TextModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/TextModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TEXT_MODEL_H_
-#define _TEXT_MODEL_H_
+#ifndef SV_TEXT_MODEL_H
+#define SV_TEXT_MODEL_H
 
 #include "SparseModel.h"
 #include "base/XmlExportable.h"
@@ -44,7 +44,7 @@
     QString getLabel() const { return label; }
     
     void toXml(QTextStream &stream, QString indent = "",
-               QString extraAttributes = "") const
+               QString extraAttributes = "") const override
     {
         stream << QString("%1<point frame=\"%2\" height=\"%3\" label=\"%4\" %5/>\n")
             .arg(indent).arg(frame).arg(height)
@@ -89,9 +89,9 @@
         SparseModel<TextPoint>(sampleRate, resolution, notifyOnAdd)
     { }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const
+                       QString extraAttributes = "") const override
     {
         SparseModel<TextPoint>::toXml
             (out, 
@@ -100,18 +100,18 @@
              .arg(extraAttributes));
     }
 
-    QString getTypeName() const { return tr("Text"); }
+    QString getTypeName() const override { return tr("Text"); }
 
     /**
      * TabularModel methods.  
      */
     
-    virtual int getColumnCount() const
+    int getColumnCount() const override
     {
         return 4;
     }
 
-    virtual QString getHeading(int column) const
+    QString getHeading(int column) const override
     {
         switch (column) {
         case 0: return tr("Time");
@@ -122,7 +122,7 @@
         }
     }
 
-    virtual QVariant getData(int row, int column, int role) const
+    QVariant getData(int row, int column, int role) const override
     {
         if (column < 2) {
             return SparseModel<TextPoint>::getData
@@ -139,7 +139,7 @@
         }
     }
 
-    virtual Command *getSetDataCommand(int row, int column, const QVariant &value, int role)
+    Command *getSetDataCommand(int row, int column, const QVariant &value, int role) override
     {
         if (column < 2) {
             return SparseModel<TextPoint>::getSetDataCommand
@@ -163,12 +163,12 @@
         return command->finish();
     }
 
-    virtual bool isColumnTimeValue(int column) const
+    bool isColumnTimeValue(int column) const override
     {
         return (column < 2); 
     }
 
-    virtual SortType getSortType(int column) const
+    SortType getSortType(int column) const override
     {
         if (column == 3) return SortAlphabetical;
         return SortNumeric;
--- a/data/model/WaveFileModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/WaveFileModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -28,16 +28,16 @@
     virtual ~WaveFileModel();
 
     virtual sv_frame_t getFrameCount() const = 0;
-    virtual int getChannelCount() const = 0;
-    virtual sv_samplerate_t getSampleRate() const = 0;
-    virtual sv_samplerate_t getNativeRate() const = 0;
+    int getChannelCount() const override = 0;
+    sv_samplerate_t getSampleRate() const override = 0;
+    sv_samplerate_t getNativeRate() const override = 0;
 
-    virtual QString getTitle() const = 0;
-    virtual QString getMaker() const = 0;
-    virtual QString getLocation() const = 0;
+    QString getTitle() const override = 0;
+    QString getMaker() const override = 0;
+    QString getLocation() const override = 0;
 
-    virtual sv_frame_t getStartFrame() const = 0;
-    virtual sv_frame_t getEndFrame() const = 0;
+    sv_frame_t getStartFrame() const override = 0;
+    sv_frame_t getEndFrame() const override = 0;
 
     virtual void setStartFrame(sv_frame_t startFrame) = 0;
 
--- a/data/model/WritableWaveFileModel.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/WritableWaveFileModel.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -40,10 +40,10 @@
                                              sv_samplerate_t sampleRate,
                                              int channels,
                                              Normalisation norm) :
-    m_model(0),
-    m_temporaryWriter(0),
-    m_targetWriter(0),
-    m_reader(0),
+    m_model(nullptr),
+    m_temporaryWriter(nullptr),
+    m_targetWriter(nullptr),
+    m_reader(nullptr),
     m_normalisation(norm),
     m_sampleRate(sampleRate),
     m_channels(channels),
@@ -57,10 +57,10 @@
 WritableWaveFileModel::WritableWaveFileModel(sv_samplerate_t sampleRate,
                                              int channels,
                                              Normalisation norm) :
-    m_model(0),
-    m_temporaryWriter(0),
-    m_targetWriter(0),
-    m_reader(0),
+    m_model(nullptr),
+    m_temporaryWriter(nullptr),
+    m_targetWriter(nullptr),
+    m_reader(nullptr),
     m_normalisation(norm),
     m_sampleRate(sampleRate),
     m_channels(channels),
@@ -73,10 +73,10 @@
 
 WritableWaveFileModel::WritableWaveFileModel(sv_samplerate_t sampleRate,
                                              int channels) :
-    m_model(0),
-    m_temporaryWriter(0),
-    m_targetWriter(0),
-    m_reader(0),
+    m_model(nullptr),
+    m_temporaryWriter(nullptr),
+    m_targetWriter(nullptr),
+    m_reader(nullptr),
     m_normalisation(Normalisation::None),
     m_sampleRate(sampleRate),
     m_channels(channels),
@@ -150,7 +150,7 @@
     if (!m_model->isOK()) {
         SVCERR << "WritableWaveFileModel: Error in creating wave file model" << endl;
         delete m_model;
-        m_model = 0;
+        m_model = nullptr;
         return;
     }
     m_model->setStartFrame(m_startFrame);
@@ -291,7 +291,7 @@
     m_targetWriter->close();
 
     delete m_temporaryWriter;
-    m_temporaryWriter = 0;
+    m_temporaryWriter = nullptr;
     QFile::remove(m_temporaryPath);
 }
 
--- a/data/model/WritableWaveFileModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/WritableWaveFileModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -138,8 +138,8 @@
      */
     int getWriteProportion() const;
     
-    bool isOK() const;
-    bool isReady(int *) const;
+    bool isOK() const override;
+    bool isReady(int *) const override;
     
     /**
      * Return the generation completion percentage of this model. This
@@ -149,53 +149,53 @@
      */
     virtual int getCompletion() const { return 100; }
 
-    const ZoomConstraint *getZoomConstraint() const {
+    const ZoomConstraint *getZoomConstraint() const override {
         static PowerOfSqrtTwoZoomConstraint zc;
         return &zc;
     }
 
-    sv_frame_t getFrameCount() const;
-    int getChannelCount() const { return m_channels; }
-    sv_samplerate_t getSampleRate() const { return m_sampleRate; }
-    sv_samplerate_t getNativeRate() const { return m_sampleRate; }
+    sv_frame_t getFrameCount() const override;
+    int getChannelCount() const override { return m_channels; }
+    sv_samplerate_t getSampleRate() const override { return m_sampleRate; }
+    sv_samplerate_t getNativeRate() const override { return m_sampleRate; }
 
-    QString getTitle() const {
+    QString getTitle() const override {
         if (m_model) return m_model->getTitle();
         else return "";
     } 
-    QString getMaker() const {
+    QString getMaker() const override {
         if (m_model) return m_model->getMaker();
         else return "";
     }
-    QString getLocation() const {
+    QString getLocation() const override {
         if (m_model) return m_model->getLocation();
         else return "";
     }
 
-    float getValueMinimum() const { return -1.0f; }
-    float getValueMaximum() const { return  1.0f; }
+    float getValueMinimum() const override { return -1.0f; }
+    float getValueMaximum() const override { return  1.0f; }
 
-    virtual sv_frame_t getStartFrame() const { return m_startFrame; }
-    virtual sv_frame_t getEndFrame() const { return m_startFrame + getFrameCount(); }
+    sv_frame_t getStartFrame() const override { return m_startFrame; }
+    sv_frame_t getEndFrame() const override { return m_startFrame + getFrameCount(); }
 
-    void setStartFrame(sv_frame_t startFrame);
+    void setStartFrame(sv_frame_t startFrame) override;
 
-    virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const;
+    floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
+    std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual int getSummaryBlockSize(int desired) const;
+    int getSummaryBlockSize(int desired) const override;
 
-    virtual void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
-                              RangeBlock &ranges, int &blockSize) const;
+    void getSummaries(int channel, sv_frame_t start, sv_frame_t count,
+                              RangeBlock &ranges, int &blockSize) const override;
 
-    virtual Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const;
+    Range getSummary(int channel, sv_frame_t start, sv_frame_t count) const override;
 
-    QString getTypeName() const { return tr("Writable Wave File"); }
+    QString getTypeName() const override { return tr("Writable Wave File"); }
 
-    virtual void toXml(QTextStream &out,
+    void toXml(QTextStream &out,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
 protected:
     ReadOnlyWaveFileModel *m_model;
--- a/data/model/test/MockWaveModel.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/model/test/MockWaveModel.h	Wed Jan 09 15:24:38 2019 +0000
@@ -37,22 +37,22 @@
      * to "pad" number of zero samples at the start and end */
     MockWaveModel(std::vector<Sort> sorts, int length, int pad);
 
-    virtual float getValueMinimum() const { return -1.f; }
-    virtual float getValueMaximum() const { return  1.f; }
-    virtual int getChannelCount() const { return int(m_data.size()); }
+    float getValueMinimum() const override { return -1.f; }
+    float getValueMaximum() const override { return  1.f; }
+    int getChannelCount() const override { return int(m_data.size()); }
     
-    virtual floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const;
-    virtual std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const;
+    floatvec_t getData(int channel, sv_frame_t start, sv_frame_t count) const override;
+    std::vector<floatvec_t> getMultiChannelData(int fromchannel, int tochannel, sv_frame_t start, sv_frame_t count) const override;
 
-    virtual bool canPlay() const { return true; }
-    virtual QString getDefaultPlayClipId() const { return ""; }
+    bool canPlay() const override { return true; }
+    QString getDefaultPlayClipId() const override { return ""; }
 
-    virtual sv_frame_t getStartFrame() const { return 0; }
-    virtual sv_frame_t getEndFrame() const { return m_data[0].size(); }
-    virtual sv_samplerate_t getSampleRate() const { return 44100; }
-    virtual bool isOK() const { return true; }
+    sv_frame_t getStartFrame() const override { return 0; }
+    sv_frame_t getEndFrame() const override { return m_data[0].size(); }
+    sv_samplerate_t getSampleRate() const override { return 44100; }
+    bool isOK() const override { return true; }
     
-    QString getTypeName() const { return tr("Mock Wave"); }
+    QString getTypeName() const override { return tr("Mock Wave"); }
 
 private:
     std::vector<std::vector<float> > m_data;
--- a/data/osc/OSCMessage.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/osc/OSCMessage.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _OSC_MESSAGE_H_
-#define _OSC_MESSAGE_H_
+#ifndef SV_OSC_MESSAGE_H
+#define SV_OSC_MESSAGE_H
 
 #include <QString>
 #include <QVariant>
--- a/data/osc/OSCQueue.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/osc/OSCQueue.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -91,16 +91,16 @@
    
 OSCQueue::OSCQueue() :
 #ifdef HAVE_LIBLO
-    m_thread(0),
+    m_thread(nullptr),
 #endif
     m_buffer(OSC_MESSAGE_QUEUE_SIZE)
 {
     Profiler profiler("OSCQueue::OSCQueue");
 
 #ifdef HAVE_LIBLO
-    m_thread = lo_server_thread_new(NULL, oscError);
+    m_thread = lo_server_thread_new(nullptr, oscError);
 
-    lo_server_thread_add_method(m_thread, NULL, NULL,
+    lo_server_thread_add_method(m_thread, nullptr, nullptr,
                                 oscMessageHandler, this);
 
     lo_server_thread_start(m_thread);
@@ -127,7 +127,7 @@
 OSCQueue::isOK() const
 {
 #ifdef HAVE_LIBLO
-    return (m_thread != 0);
+    return (m_thread != nullptr);
 #else
     return false;
 #endif
--- a/data/osc/OSCQueue.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/data/osc/OSCQueue.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam and QMUL.
 */
 
-#ifndef _OSC_QUEUE_H_
-#define _OSC_QUEUE_H_
+#ifndef SV_OSC_QUEUE_H
+#define SV_OSC_QUEUE_H
 
 #include "OSCMessage.h"
 
--- a/plugin/DSSIPluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/DSSIPluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -45,7 +45,7 @@
     LADSPAPluginFactory()
 {
     m_hostDescriptor.DSSI_API_Version = 2;
-    m_hostDescriptor.request_transport_information = NULL;
+    m_hostDescriptor.request_transport_information = nullptr;
     m_hostDescriptor.request_midi_send = DSSIPluginInstance::requestMidiSend;
     m_hostDescriptor.request_non_rt_thread = DSSIPluginInstance::requestNonRTThread;
     m_hostDescriptor.midi_send = DSSIPluginInstance::midiSend;
@@ -134,7 +134,7 @@
         return instance;
     }
 
-    return 0;
+    return nullptr;
 }
 
 const DSSI_Descriptor *
@@ -151,7 +151,7 @@
             }
             return descriptor;
         } else {
-            return 0;
+            return nullptr;
         }
     }
     
@@ -161,7 +161,7 @@
         loadLibrary(soname);
         if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
             cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: loadLibrary failed for " << soname << endl;
-            return 0;
+            return nullptr;
         }
         firstInLibrary = true;
     }
@@ -173,10 +173,10 @@
 
     if (!fn) {
         cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No descriptor function in library " << soname << endl;
-        return 0;
+        return nullptr;
     }
 
-    const DSSI_Descriptor *descriptor = 0;
+    const DSSI_Descriptor *descriptor = nullptr;
     
     int index = 0;
     while ((descriptor = fn(index))) {
@@ -191,7 +191,7 @@
 
     cerr << "WARNING: DSSIPluginFactory::getDSSIDescriptor: No such plugin as " << label << " in library " << soname << endl;
 
-    return 0;
+    return nullptr;
 }
 
 const LADSPA_Descriptor *
@@ -199,7 +199,7 @@
 {
     const DSSI_Descriptor *dssiDescriptor = getDSSIDescriptor(identifier);
     if (dssiDescriptor) return dssiDescriptor->LADSPA_Plugin;
-    else return 0;
+    else return nullptr;
 }
 
 
@@ -308,7 +308,7 @@
         return;
     }
 
-    const DSSI_Descriptor *descriptor = 0;
+    const DSSI_Descriptor *descriptor = nullptr;
     
     int index = 0;
     while ((descriptor = fn(index))) {
@@ -337,8 +337,8 @@
             ("dssi", soname, ladspaDescriptor->Label);
 
 #ifdef HAVE_LRDF
-        char *def_uri = 0;
-        lrdf_defaults *defs = 0;
+        char *def_uri = nullptr;
+        lrdf_defaults *defs = nullptr;
                 
         QString category = m_taxonomy[identifier];
 
--- a/plugin/DSSIPluginFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/DSSIPluginFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _DSSI_PLUGIN_FACTORY_H_
-#define _DSSI_PLUGIN_FACTORY_H_
+#ifndef SV_DSSI_PLUGIN_FACTORY_H
+#define SV_DSSI_PLUGIN_FACTORY_H
 
 #define DSSI_API_LEVEL 2
 
@@ -35,14 +35,14 @@
 public:
     virtual ~DSSIPluginFactory();
 
-    virtual void enumeratePlugins(std::vector<QString> &list);
+    void enumeratePlugins(std::vector<QString> &list) override;
 
-    virtual RealTimePluginInstance *instantiatePlugin(QString identifier,
+    RealTimePluginInstance *instantiatePlugin(QString identifier,
                                                       int clientId,
                                                       int position,
                                                       sv_samplerate_t sampleRate,
                                                       int blockSize,
-                                                      int channels);
+                                                      int channels) override;
 
     static std::vector<QString> getPluginPath();
 
@@ -50,15 +50,15 @@
     DSSIPluginFactory();
     friend class RealTimePluginFactory;
 
-    virtual PluginScan::PluginType getPluginType() const {
+    PluginScan::PluginType getPluginType() const override {
         return PluginScan::DSSIPlugin;
     }
 
-    virtual std::vector<QString> getLRDFPath(QString &baseUri);
+    std::vector<QString> getLRDFPath(QString &baseUri) override;
 
-    virtual void discoverPluginsFrom(QString soName);
+    void discoverPluginsFrom(QString soName) override;
 
-    virtual const LADSPA_Descriptor *getLADSPADescriptor(QString identifier);
+    const LADSPA_Descriptor *getLADSPADescriptor(QString identifier) override;
     virtual const DSSI_Descriptor *getDSSIDescriptor(QString identifier);
 
     DSSI_Host_Descriptor m_hostDescriptor;
--- a/plugin/DSSIPluginInstance.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/DSSIPluginInstance.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -47,7 +47,7 @@
 #endif
 
 DSSIPluginInstance::GroupMap DSSIPluginInstance::m_groupMap;
-snd_seq_event_t **DSSIPluginInstance::m_groupLocalEventBuffers = 0;
+snd_seq_event_t **DSSIPluginInstance::m_groupLocalEventBuffers = nullptr;
 size_t DSSIPluginInstance::m_groupLocalEventBufferCount = 0;
 Scavenger<ScavengerArrayWrapper<snd_seq_event_t *> > DSSIPluginInstance::m_bufferScavenger(2, 10);
 std::map<LADSPA_Handle, std::set<DSSIPluginInstance::NonRTPluginThread *> > DSSIPluginInstance::m_threads;
@@ -64,14 +64,14 @@
     RealTimePluginInstance(factory, identifier),
     m_client(clientId),
     m_position(position),
-    m_instanceHandle(0),
+    m_instanceHandle(nullptr),
     m_descriptor(descriptor),
     m_programCacheValid(false),
     m_eventBuffer(EVENT_BUFFER_SIZE),
     m_blockSize(blockSize),
     m_idealChannelCount(idealChannelCount),
     m_sampleRate(sampleRate),
-    m_latencyPort(0),
+    m_latencyPort(nullptr),
     m_run(false),
     m_bypassed(false),
     m_grouped(false),
@@ -300,7 +300,7 @@
 void
 DSSIPluginInstance::silence()
 {
-    if (m_instanceHandle != 0) {
+    if (m_instanceHandle != nullptr) {
         deactivate();
         activate();
     }
@@ -325,7 +325,7 @@
         return;
     }
 
-    if (m_instanceHandle != 0) {
+    if (m_instanceHandle != nullptr) {
         deactivate();
     }
 
@@ -350,7 +350,7 @@
         connectPorts();
     }
 
-    if (m_instanceHandle != 0) {
+    if (m_instanceHandle != nullptr) {
         activate();
     }
 }
@@ -423,7 +423,7 @@
 
     detachFromGroup();
 
-    if (m_instanceHandle != 0) {
+    if (m_instanceHandle != nullptr) {
         deactivate();
     }
 
@@ -1340,7 +1340,7 @@
     }
 
     m_descriptor->LADSPA_Plugin->cleanup(m_instanceHandle);
-    m_instanceHandle = 0;
+    m_instanceHandle = nullptr;
 #ifdef DEBUG_DSSI
     SVDEBUG << "DSSIPluginInstance::cleanup " << m_identifier << " done" << endl;
 #endif
--- a/plugin/DSSIPluginInstance.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/DSSIPluginInstance.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _DSSIPLUGININSTANCE_H_
-#define _DSSIPLUGININSTANCE_H_
+#ifndef SV_DSSIPLUGININSTANCE_H
+#define SV_DSSIPLUGININSTANCE_H
 
 #define DSSI_API_LEVEL 2
 
@@ -41,64 +41,64 @@
 public:
     virtual ~DSSIPluginInstance();
 
-    virtual bool isOK() const { return m_instanceHandle != 0; }
+    bool isOK() const override { return m_instanceHandle != 0; }
 
     int getClientId() const { return m_client; }
-    virtual QString getPluginIdentifier() const { return m_identifier; }
+    QString getPluginIdentifier() const override { return m_identifier; }
     int getPosition() const { return m_position; }
 
-    virtual std::string getIdentifier() const;
-    virtual std::string getName() const;
-    virtual std::string getDescription() const;
-    virtual std::string getMaker() const;
-    virtual int getPluginVersion() const;
-    virtual std::string getCopyright() const;
+    std::string getIdentifier() const override;
+    std::string getName() const override;
+    std::string getDescription() const override;
+    std::string getMaker() const override;
+    int getPluginVersion() const override;
+    std::string getCopyright() const override;
 
-    virtual void run(const RealTime &, int count = 0);
+    void run(const RealTime &, int count = 0) override;
 
-    virtual int getParameterCount() const;
-    virtual void setParameterValue(int parameter, float value);
-    virtual float getParameterValue(int parameter) const;
-    virtual float getParameterDefault(int parameter) const;
-    virtual int getParameterDisplayHint(int parameter) const;
+    int getParameterCount() const override;
+    void setParameterValue(int parameter, float value) override;
+    float getParameterValue(int parameter) const override;
+    float getParameterDefault(int parameter) const override;
+    int getParameterDisplayHint(int parameter) const override;
 
-    virtual ParameterList getParameterDescriptors() const;
-    virtual float getParameter(std::string) const;
-    virtual void setParameter(std::string, float);
+    ParameterList getParameterDescriptors() const override;
+    float getParameter(std::string) const override;
+    void setParameter(std::string, float) override;
 
-    virtual std::string configure(std::string key, std::string value);
-    virtual void sendEvent(const RealTime &eventTime,
-                           const void *event);
-    virtual void clearEvents();
+    std::string configure(std::string key, std::string value) override;
+    void sendEvent(const RealTime &eventTime,
+                           const void *event) override;
+    void clearEvents() override;
 
-    virtual int getBufferSize() const { return m_blockSize; }
-    virtual int getAudioInputCount() const { return (int)m_audioPortsIn.size(); }
-    virtual int getAudioOutputCount() const { return m_idealChannelCount; }
-    virtual sample_t **getAudioInputBuffers() { return m_inputBuffers; }
-    virtual sample_t **getAudioOutputBuffers() { return m_outputBuffers; }
+    int getBufferSize() const override { return m_blockSize; }
+    int getAudioInputCount() const override { return (int)m_audioPortsIn.size(); }
+    int getAudioOutputCount() const override { return m_idealChannelCount; }
+    sample_t **getAudioInputBuffers() override { return m_inputBuffers; }
+    sample_t **getAudioOutputBuffers() override { return m_outputBuffers; }
 
-    virtual int getControlOutputCount() const { return (int)m_controlPortsOut.size(); }
-    virtual float getControlOutputValue(int n) const;
+    int getControlOutputCount() const override { return (int)m_controlPortsOut.size(); }
+    float getControlOutputValue(int n) const override;
 
-    virtual ProgramList getPrograms() const;
-    virtual std::string getCurrentProgram() const;
-    virtual std::string getProgram(int bank, int program) const;
+    ProgramList getPrograms() const override;
+    std::string getCurrentProgram() const override;
+    std::string getProgram(int bank, int program) const override;
     virtual int getProgram(std::string name) const;
-    virtual void selectProgram(std::string program);
+    void selectProgram(std::string program) override;
 
-    virtual bool isBypassed() const { return m_bypassed; }
-    virtual void setBypassed(bool bypassed) { m_bypassed = bypassed; }
+    bool isBypassed() const override { return m_bypassed; }
+    void setBypassed(bool bypassed) override { m_bypassed = bypassed; }
 
-    virtual sv_frame_t getLatency();
+    sv_frame_t getLatency() override;
 
-    virtual void silence();
-    virtual void discardEvents();
-    virtual void setIdealChannelCount(int channels); // may re-instantiate
+    void silence() override;
+    void discardEvents() override;
+    void setIdealChannelCount(int channels) override; // may re-instantiate
 
     virtual bool isInGroup() const { return m_grouped; }
     virtual void detachFromGroup();
 
-    virtual std::string getType() const { return "DSSI Real-Time Plugin"; }
+    std::string getType() const override { return "DSSI Real-Time Plugin"; }
 
 protected:
     // To be constructed only by DSSIPluginFactory
@@ -209,7 +209,7 @@
             m_runFunction(runFunction),
             m_exiting(false) { }
 
-        virtual void run();
+        void run() override;
         void setExiting() { m_exiting = true; }
 
     protected:
--- a/plugin/FeatureExtractionPluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/FeatureExtractionPluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -26,7 +26,7 @@
 FeatureExtractionPluginFactory::instance()
 {
     static QMutex mutex;
-    static FeatureExtractionPluginFactory *instance = 0;
+    static FeatureExtractionPluginFactory *instance = nullptr;
 
     QMutexLocker locker(&mutex);
     
--- a/plugin/LADSPAPluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/LADSPAPluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -53,7 +53,7 @@
 {
     for (std::set<RealTimePluginInstance *>::iterator i = m_instances.begin();
          i != m_instances.end(); ++i) {
-        (*i)->setFactory(0);
+        (*i)->setFactory(nullptr);
         delete *i;
     }
     m_instances.clear();
@@ -148,7 +148,7 @@
         return i->second;
     } 
 
-    return 0;
+    return nullptr;
 }
 
 float
@@ -363,7 +363,7 @@
         return instance;
     }
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -423,7 +423,7 @@
         loadLibrary(soname);
         if (m_libraryHandles.find(soname) == m_libraryHandles.end()) {
             SVCERR << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: loadLibrary failed for " << soname << endl;
-            return 0;
+            return nullptr;
         }
     }
 
@@ -434,10 +434,10 @@
 
     if (!fn) {
         SVCERR << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No descriptor function in library " << soname << endl;
-        return 0;
+        return nullptr;
     }
 
-    const LADSPA_Descriptor *descriptor = 0;
+    const LADSPA_Descriptor *descriptor = nullptr;
     
     int index = 0;
     while ((descriptor = fn(index))) {
@@ -447,7 +447,7 @@
 
     SVCERR << "WARNING: LADSPAPluginFactory::getLADSPADescriptor: No such plugin as " << label << " in library " << soname << endl;
 
-    return 0;
+    return nullptr;
 }
 
 void
@@ -702,7 +702,7 @@
         return;
     }
 
-    const LADSPA_Descriptor *descriptor = 0;
+    const LADSPA_Descriptor *descriptor = nullptr;
     
     int index = 0;
     while ((descriptor = fn(index))) {
@@ -723,8 +723,8 @@
             ("ladspa", soname, descriptor->Label);
 
 #ifdef HAVE_LRDF
-        char *def_uri = 0;
-        lrdf_defaults *defs = 0;
+        char *def_uri = nullptr;
+        lrdf_defaults *defs = nullptr;
                 
         if (m_lrdfTaxonomy[descriptor->UniqueID] != "") {
             m_taxonomy[identifier] = m_lrdfTaxonomy[descriptor->UniqueID];
@@ -868,7 +868,7 @@
 #ifdef HAVE_LRDF
     lrdf_uris *uris = lrdf_get_instances(uri.toStdString().c_str());
 
-    if (uris != NULL) {
+    if (uris != nullptr) {
         for (unsigned int i = 0; i < uris->count; ++i) {
             m_lrdfTaxonomy[lrdf_get_uid(uris->items[i])] = base;
         }
@@ -877,7 +877,7 @@
 
     uris = lrdf_get_subclasses(uri.toStdString().c_str());
 
-    if (uris != NULL) {
+    if (uris != nullptr) {
         for (unsigned int i = 0; i < uris->count; ++i) {
             char *label = lrdf_get_label(uris->items[i]);
             generateTaxonomy(uris->items[i],
--- a/plugin/LADSPAPluginFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/LADSPAPluginFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam and Richard Bown.
 */
 
-#ifndef _LADSPA_PLUGIN_FACTORY_H_
-#define _LADSPA_PLUGIN_FACTORY_H_
+#ifndef SV_LADSPA_PLUGIN_FACTORY_H
+#define SV_LADSPA_PLUGIN_FACTORY_H
 
 #include "RealTimePluginFactory.h"
 #include "api/ladspa.h"
@@ -38,24 +38,24 @@
 public:
     virtual ~LADSPAPluginFactory();
 
-    virtual void discoverPlugins();
+    void discoverPlugins() override;
 
-    virtual const std::vector<QString> &getPluginIdentifiers() const;
+    const std::vector<QString> &getPluginIdentifiers() const override;
 
-    virtual void enumeratePlugins(std::vector<QString> &list);
+    void enumeratePlugins(std::vector<QString> &list) override;
 
-    virtual const RealTimePluginDescriptor *getPluginDescriptor(QString identifier) const;
+    const RealTimePluginDescriptor *getPluginDescriptor(QString identifier) const override;
 
-    virtual RealTimePluginInstance *instantiatePlugin(QString identifier,
+    RealTimePluginInstance *instantiatePlugin(QString identifier,
                                                       int clientId,
                                                       int position,
                                                       sv_samplerate_t sampleRate,
                                                       int blockSize,
-                                                      int channels);
+                                                      int channels) override;
 
-    virtual QString getPluginCategory(QString identifier);
+    QString getPluginCategory(QString identifier) override;
 
-    virtual QString getPluginLibraryPath(QString identifier);
+    QString getPluginLibraryPath(QString identifier) override;
     
     float getPortMinimum(const LADSPA_Descriptor *, int port);
     float getPortMaximum(const LADSPA_Descriptor *, int port);
@@ -79,7 +79,7 @@
     virtual void generateTaxonomy(QString uri, QString base);
     virtual void generateFallbackCategories();
 
-    virtual void releasePlugin(RealTimePluginInstance *, QString);
+    void releasePlugin(RealTimePluginInstance *, QString) override;
 
     virtual const LADSPA_Descriptor *getLADSPADescriptor(QString identifier);
 
--- a/plugin/LADSPAPluginInstance.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/LADSPAPluginInstance.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -48,20 +48,20 @@
     m_descriptor(descriptor),
     m_blockSize(blockSize),
     m_sampleRate(sampleRate),
-    m_latencyPort(0),
+    m_latencyPort(nullptr),
     m_run(false),
     m_bypassed(false)
 {
     init(idealChannelCount);
 
     if (m_audioPortsIn.size() == 0) {
-        m_inputBuffers = 0;
+        m_inputBuffers = nullptr;
     } else {
         m_inputBuffers  = new sample_t*[m_instanceCount * m_audioPortsIn.size()];
     }
 
     if (m_audioPortsOut.size() == 0) {
-        m_outputBuffers = 0;
+        m_outputBuffers = nullptr;
     } else {
         m_outputBuffers = new sample_t*[m_instanceCount * m_audioPortsOut.size()];
     }
--- a/plugin/LADSPAPluginInstance.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/LADSPAPluginInstance.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam and Richard Bown.
 */
 
-#ifndef _LADSPAPLUGININSTANCE_H_
-#define _LADSPAPLUGININSTANCE_H_
+#ifndef SV_LADSPAPLUGININSTANCE_H
+#define SV_LADSPAPLUGININSTANCE_H
 
 #include <vector>
 #include <set>
@@ -38,49 +38,49 @@
 public:
     virtual ~LADSPAPluginInstance();
 
-    virtual bool isOK() const { return m_instanceHandles.size() != 0; }
+    bool isOK() const override { return m_instanceHandles.size() != 0; }
 
     int getClientId() const { return m_client; }
-    virtual QString getPluginIdentifier() const { return m_identifier; }
+    QString getPluginIdentifier() const override { return m_identifier; }
     int getPosition() const { return m_position; }
 
-    virtual std::string getIdentifier() const;
-    virtual std::string getName() const;
-    virtual std::string getDescription() const;
-    virtual std::string getMaker() const;
-    virtual int getPluginVersion() const;
-    virtual std::string getCopyright() const;
+    std::string getIdentifier() const override;
+    std::string getName() const override;
+    std::string getDescription() const override;
+    std::string getMaker() const override;
+    int getPluginVersion() const override;
+    std::string getCopyright() const override;
 
-    virtual void run(const RealTime &rt, int count = 0);
+    void run(const RealTime &rt, int count = 0) override;
 
-    virtual int getParameterCount() const;
-    virtual void setParameterValue(int parameter, float value);
-    virtual float getParameterValue(int parameter) const;
-    virtual float getParameterDefault(int parameter) const;
-    virtual int getParameterDisplayHint(int parameter) const;
+    int getParameterCount() const override;
+    void setParameterValue(int parameter, float value) override;
+    float getParameterValue(int parameter) const override;
+    float getParameterDefault(int parameter) const override;
+    int getParameterDisplayHint(int parameter) const override;
     
-    virtual ParameterList getParameterDescriptors() const;
-    virtual float getParameter(std::string) const;
-    virtual void setParameter(std::string, float);
+    ParameterList getParameterDescriptors() const override;
+    float getParameter(std::string) const override;
+    void setParameter(std::string, float) override;
 
-    virtual int getBufferSize() const { return m_blockSize; }
-    virtual int getAudioInputCount() const { return int(m_instanceCount * m_audioPortsIn.size()); }
-    virtual int getAudioOutputCount() const { return int(m_instanceCount * m_audioPortsOut.size()); }
-    virtual sample_t **getAudioInputBuffers() { return m_inputBuffers; }
-    virtual sample_t **getAudioOutputBuffers() { return m_outputBuffers; }
+    int getBufferSize() const override { return m_blockSize; }
+    int getAudioInputCount() const override { return int(m_instanceCount * m_audioPortsIn.size()); }
+    int getAudioOutputCount() const override { return int(m_instanceCount * m_audioPortsOut.size()); }
+    sample_t **getAudioInputBuffers() override { return m_inputBuffers; }
+    sample_t **getAudioOutputBuffers() override { return m_outputBuffers; }
 
-    virtual int getControlOutputCount() const { return int(m_controlPortsOut.size()); }
-    virtual float getControlOutputValue(int n) const;
+    int getControlOutputCount() const override { return int(m_controlPortsOut.size()); }
+    float getControlOutputValue(int n) const override;
 
-    virtual bool isBypassed() const { return m_bypassed; }
-    virtual void setBypassed(bool bypassed) { m_bypassed = bypassed; }
+    bool isBypassed() const override { return m_bypassed; }
+    void setBypassed(bool bypassed) override { m_bypassed = bypassed; }
 
-    virtual sv_frame_t getLatency();
+    sv_frame_t getLatency() override;
 
-    virtual void silence();
-    virtual void setIdealChannelCount(int channels); // may re-instantiate
+    void silence() override;
+    void setIdealChannelCount(int channels) override; // may re-instantiate
 
-    virtual std::string getType() const { return "LADSPA Real-Time Plugin"; }
+    std::string getType() const override { return "LADSPA Real-Time Plugin"; }
 
 protected:
     // To be constructed only by LADSPAPluginFactory
--- a/plugin/NativeVampPluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/NativeVampPluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -44,7 +44,7 @@
     PluginDeletionNotifyAdapter(Vamp::Plugin *plugin,
                                 NativeVampPluginFactory *factory) :
         PluginWrapper(plugin), m_factory(factory) { }
-    virtual ~PluginDeletionNotifyAdapter();
+    ~PluginDeletionNotifyAdapter() override;
 protected:
     NativeVampPluginFactory *m_factory;
 };
@@ -54,7 +54,7 @@
     // see notes in vamp-sdk/hostext/PluginLoader.cpp from which this is drawn
     Vamp::Plugin *p = m_plugin;
     delete m_plugin;
-    m_plugin = 0;
+    m_plugin = nullptr;
     // acceptable use after free here, as pluginDeleted uses p only as
     // pointer key and does not deref it
     if (m_factory) m_factory->pluginDeleted(p);
@@ -147,7 +147,7 @@
             cerr << "NativeVampPluginFactory::getPluginIdentifiers: Vamp descriptor found" << endl;
 #endif
 
-        const VampPluginDescriptor *descriptor = 0;
+        const VampPluginDescriptor *descriptor = nullptr;
         int index = 0;
 
         map<string, int> known;
@@ -293,10 +293,10 @@
 {
     Profiler profiler("NativeVampPluginFactory::instantiatePlugin");
 
-    Vamp::Plugin *rv = 0;
-    Vamp::PluginHostAdapter *plugin = 0;
+    Vamp::Plugin *rv = nullptr;
+    Vamp::PluginHostAdapter *plugin = nullptr;
 
-    const VampPluginDescriptor *descriptor = 0;
+    const VampPluginDescriptor *descriptor = nullptr;
     int index = 0;
 
     QString type, soname, label;
@@ -305,14 +305,14 @@
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
         cerr << "NativeVampPluginFactory::instantiatePlugin: Wrong factory for plugin type " << type << endl;
 #endif
-        return 0;
+        return nullptr;
     }
 
     QString found = findPluginFile(soname);
 
     if (found == "") {
         SVDEBUG << "NativeVampPluginFactory::instantiatePlugin: Failed to find library file " << soname << endl;
-        return 0;
+        return nullptr;
     } else if (found != soname) {
 
 #ifdef DEBUG_PLUGIN_SCAN_AND_INSTANTIATE
@@ -328,7 +328,7 @@
             
     if (!libraryHandle) {
         SVDEBUG << "NativeVampPluginFactory::instantiatePlugin: Failed to load library " << soname << ": " << DLERROR() << endl;
-        return 0;
+        return nullptr;
     }
 
     VampGetPluginDescriptorFunction fn = (VampGetPluginDescriptorFunction)
--- a/plugin/PiperVampPluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/PiperVampPluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -174,12 +174,12 @@
 
     if (m_origins.find(identifier) == m_origins.end()) {
         SVCERR << "ERROR: No known server for identifier " << identifier << endl;
-        return 0;
+        return nullptr;
     }
     
     auto psd = getPluginStaticData(identifier);
     if (psd.pluginKey == "") {
-        return 0;
+        return nullptr;
     }
 
     SVDEBUG << "PiperVampPluginFactory: Creating PiperAutoPlugin for server "
@@ -194,7 +194,7 @@
     
     if (!ap->isOK()) {
         delete ap;
-        return 0;
+        return nullptr;
     }
 
     return ap;
--- a/plugin/PluginIdentifier.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/PluginIdentifier.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam and QMUL.
 */
 
-#ifndef _PLUGIN_IDENTIFIER_H_
-#define _PLUGIN_IDENTIFIER_H_
+#ifndef SV_PLUGIN_IDENTIFIER_H
+#define SV_PLUGIN_IDENTIFIER_H
 
 #include <QString>
 
--- a/plugin/PluginScan.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/PluginScan.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -31,7 +31,7 @@
 #endif
 {
 protected:
-    void log(std::string message) {
+    void log(std::string message) override {
         SVDEBUG << "PluginScan: " << message << endl;
     }
 };
@@ -39,7 +39,7 @@
 PluginScan *PluginScan::getInstance()
 {
     static QMutex mutex;
-    static PluginScan *m_instance = 0;
+    static PluginScan *m_instance = nullptr;
     mutex.lock();
     if (!m_instance) m_instance = new PluginScan();
     mutex.unlock();
--- a/plugin/PluginXml.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/PluginXml.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLUGIN_XML_H_
-#define _PLUGIN_XML_H_
+#ifndef SV_PLUGIN_XML_H
+#define SV_PLUGIN_XML_H
 
 #include "base/XmlExportable.h"
 #include <vamp-hostsdk/PluginBase.h>
@@ -30,9 +30,9 @@
     /**
      * Export plugin settings to XML.
      */
-    virtual void toXml(QTextStream &stream,
+    void toXml(QTextStream &stream,
                        QString indent = "",
-                       QString extraAttributes = "") const;
+                       QString extraAttributes = "") const override;
 
     /**
      * Set the parameters and program of a plugin from a set of XML
--- a/plugin/RealTimePluginFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/RealTimePluginFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -32,8 +32,8 @@
 
 sv_samplerate_t RealTimePluginFactory::m_sampleRate = 48000;
 
-static LADSPAPluginFactory *_ladspaInstance = 0;
-static LADSPAPluginFactory *_dssiInstance = 0;
+static LADSPAPluginFactory *_ladspaInstance = nullptr;
+static LADSPAPluginFactory *_dssiInstance = nullptr;
 
 RealTimePluginFactory::~RealTimePluginFactory()
 {
@@ -58,7 +58,7 @@
         return _dssiInstance;
     }
         
-    else return 0;
+    else return nullptr;
 }
 
 RealTimePluginFactory *
--- a/plugin/RealTimePluginFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/RealTimePluginFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -19,8 +19,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _REALTIME_PLUGIN_FACTORY_H_
-#define _REALTIME_PLUGIN_FACTORY_H_
+#ifndef SV_REALTIME_PLUGIN_FACTORY_H
+#define SV_REALTIME_PLUGIN_FACTORY_H
 
 #include <QString>
 #include <vector>
--- a/plugin/RealTimePluginInstance.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/RealTimePluginInstance.h	Wed Jan 09 15:24:38 2019 +0000
@@ -18,8 +18,8 @@
    This file copyright 2000-2006 Chris Cannam.
 */
 
-#ifndef _REALTIME_PLUGIN_INSTANCE_H_
-#define _REALTIME_PLUGIN_INSTANCE_H_
+#ifndef SV_REALTIME_PLUGIN_INSTANCE_H
+#define SV_REALTIME_PLUGIN_INSTANCE_H
 
 #include <vamp-hostsdk/PluginBase.h>
 
@@ -136,7 +136,7 @@
 
     void setFactory(RealTimePluginFactory *f) { m_factory = f; } // ew
 
-    virtual std::string getType() const { return "Real-Time Plugin"; }
+    std::string getType() const override { return "Real-Time Plugin"; }
 
     typedef std::map<std::string, std::string> ConfigurationPairMap;
     virtual ConfigurationPairMap getConfigurePairs() {
--- a/plugin/plugins/SamplePlayer.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/plugins/SamplePlayer.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -93,13 +93,13 @@
     ports,
     portNames,
     hints,
-    0, // Implementation data
+    nullptr, // Implementation data
     instantiate,
     connectPort,
     activate,
     run,
-    0, // Run adding
-    0, // Set run adding gain
+    nullptr, // Run adding
+    nullptr, // Set run adding gain
     deactivate,
     cleanup
 };
@@ -114,31 +114,31 @@
     selectProgram,
     getMidiController,
     runSynth,
-    0, // Run synth adding
-    0, // Run multiple synths
-    0, // Run multiple synths adding
+    nullptr, // Run synth adding
+    nullptr, // Run multiple synths
+    nullptr, // Run multiple synths adding
     receiveHostDescriptor
 };
 
 const DSSI_Host_Descriptor *
-SamplePlayer::hostDescriptor = 0;
+SamplePlayer::hostDescriptor = nullptr;
 
 
 const DSSI_Descriptor *
 SamplePlayer::getDescriptor(unsigned long index)
 {
     if (index == 0) return &dssiDescriptor;
-    return 0;
+    return nullptr;
 }
 
 SamplePlayer::SamplePlayer(int sampleRate) :
-    m_output(0),
-    m_retune(0),
-    m_basePitch(0),
-    m_concertA(0),
-    m_sustain(0),
-    m_release(0),
-    m_sampleData(0),
+    m_output(nullptr),
+    m_retune(nullptr),
+    m_basePitch(nullptr),
+    m_concertA(nullptr),
+    m_sustain(nullptr),
+    m_release(nullptr),
+    m_sampleData(nullptr),
     m_sampleCount(0),
     m_sampleRate(sampleRate),
     m_sampleNo(0),
@@ -158,7 +158,7 @@
 {
     if (!hostDescriptor || !hostDescriptor->request_non_rt_thread) {
         SVDEBUG << "SamplePlayer::instantiate: Host does not provide request_non_rt_thread, not instantiating" << endl;
-        return 0;
+        return nullptr;
     }
 
     SamplePlayer *player = new SamplePlayer(int(rate));
@@ -167,7 +167,7 @@
     if (hostDescriptor->request_non_rt_thread(player, workThreadCallback)) {
         SVDEBUG << "SamplePlayer::instantiate: Host rejected request_non_rt_thread call, not instantiating" << endl;
         delete player;
-        return 0;
+        return nullptr;
     }
 
     return player;
@@ -209,7 +209,7 @@
 void
 SamplePlayer::run(LADSPA_Handle handle, unsigned long samples)
 {
-    runSynth(handle, samples, 0, 0);
+    runSynth(handle, samples, nullptr, 0);
 }
 
 void
@@ -243,7 +243,7 @@
                 player->searchSamples();
             }
 
-            return 0;
+            return nullptr;
 
         } else {
             char *buffer = (char *)malloc(strlen(value) + 80);
@@ -266,7 +266,7 @@
             player->searchSamples();
         }
     }
-    if (program >= player->m_samples.size()) return 0;
+    if (program >= player->m_samples.size()) return nullptr;
 
     static DSSI_Program_Descriptor descriptor;
     static char name[60];
@@ -419,7 +419,7 @@
     sf_readf_float(file, tmpFrames, info.frames);
     sf_close(file);
 
-    tmpResamples = 0;
+    tmpResamples = nullptr;
 
     if (info.samplerate != m_sampleRate) {
         
--- a/plugin/plugins/SamplePlayer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/plugin/plugins/SamplePlayer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SAMPLE_PLAYER_H_
-#define _SAMPLE_PLAYER_H_
+#ifndef SV_SAMPLE_PLAYER_H
+#define SV_SAMPLE_PLAYER_H
 
 #define DSSI_API_LEVEL 2
 
--- a/rdf/PluginRDFDescription.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/PluginRDFDescription.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLUGIN_RDF_DESCRIPTION_H_
-#define _PLUGIN_RDF_DESCRIPTION_H_
+#ifndef SV_PLUGIN_RDF_DESCRIPTION_H
+#define SV_PLUGIN_RDF_DESCRIPTION_H
 
 #include <QString>
 #include <QStringList>
--- a/rdf/PluginRDFIndexer.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/PluginRDFIndexer.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -51,7 +51,7 @@
 using Dataquay::RDFDuplicateImportException;
 
 PluginRDFIndexer *
-PluginRDFIndexer::m_instance = 0;
+PluginRDFIndexer::m_instance = nullptr;
 
 PluginRDFIndexer *
 PluginRDFIndexer::getInstance() 
@@ -271,7 +271,7 @@
     if (FileSource::isRemote(urlString) &&
         FileSource::canHandleScheme(urlString)) {
 
-        CachedFile cf(urlString, 0, "application/rdf+xml");
+        CachedFile cf(urlString, nullptr, "application/rdf+xml");
         if (!cf.isOK()) {
             return false;
         }
--- a/rdf/PluginRDFIndexer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/PluginRDFIndexer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _PLUGIN_RDF_INDEXER_H_
-#define _PLUGIN_RDF_INDEXER_H_
+#ifndef SV_PLUGIN_RDF_INDEXER_H
+#define SV_PLUGIN_RDF_INDEXER_H
 
 #include <QString>
 #include <QStringList>
--- a/rdf/RDFExporter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/RDFExporter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RDF_EXPORTER_H_
-#define _RDF_EXPORTER_H_
+#ifndef SV_RDF_EXPORTER_H
+#define SV_RDF_EXPORTER_H
 
 #include <QString>
 
--- a/rdf/RDFFeatureWriter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/RDFFeatureWriter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -17,8 +17,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RDF_FEATURE_WRITER_H_
-#define _RDF_FEATURE_WRITER_H_
+#ifndef SV_RDF_FEATURE_WRITER_H
+#define SV_RDF_FEATURE_WRITER_H
 
 #include <string>
 #include <map>
@@ -44,24 +44,24 @@
     RDFFeatureWriter();
     virtual ~RDFFeatureWriter();
 
-    virtual string getDescription() const;
+    string getDescription() const override;
 
-    virtual ParameterList getSupportedParameters() const;
-    virtual void setParameters(map<string, string> &params);
+    ParameterList getSupportedParameters() const override;
+    void setParameters(map<string, string> &params) override;
 
-    virtual void setTrackMetadata(QString trackid, TrackMetadata metadata);
+    void setTrackMetadata(QString trackid, TrackMetadata metadata) override;
 
-    virtual void write(QString trackid,
+    void write(QString trackid,
                        const Transform &transform,
                        const Vamp::Plugin::OutputDescriptor &output,
                        const Vamp::Plugin::FeatureList &features,
-                       std::string summaryType = "");
+                       std::string summaryType = "") override;
 
     virtual void setFixedEventTypeURI(QString uri); // something of a hack
 
-    virtual void finish();
+    void finish() override;
 
-    virtual QString getWriterTag() const { return "rdf"; }
+    QString getWriterTag() const override { return "rdf"; }
 
 private:
     typedef map<QString, PluginRDFDescription> RDFDescriptionMap; // by plugin id
@@ -85,7 +85,7 @@
 
     QString m_fixedEventTypeURI;
 
-    virtual void reviewFileForAppending(QString filename);
+    void reviewFileForAppending(QString filename) override;
 
     void writePrefixes(QTextStream *);
     void writeSignalDescription(QTextStream *, QString);
--- a/rdf/RDFImporter.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/RDFImporter.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -617,7 +617,7 @@
                 if (values.size() == 1) dimensions = 2;
                 else if (values.size() > 1) dimensions = 3;
 
-                Model *model = 0;
+                Model *model = nullptr;
 
                 if (modelMap[timeline][type][dimensions].find(haveDuration) ==
                     modelMap[timeline][type][dimensions].end()) {
@@ -809,7 +809,7 @@
     bool haveAnnotations = false;
     bool haveRDF = false;
 
-    BasicStore *store = 0;
+    BasicStore *store = nullptr;
 
     // This is not expected to return anything useful, but if it does
     // anything at all then we know we have RDF
--- a/rdf/RDFImporter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/RDFImporter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RDF_IMPORTER_H_
-#define _RDF_IMPORTER_H_
+#ifndef SV_RDF_IMPORTER_H
+#define SV_RDF_IMPORTER_H
 
 #include <QObject>
 #include <QString>
--- a/rdf/RDFTransformFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/rdf/RDFTransformFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _RDF_TRANSFORM_FACTORY_H_
-#define _RDF_TRANSFORM_FACTORY_H_
+#ifndef SV_RDF_TRANSFORM_FACTORY_H
+#define SV_RDF_TRANSFORM_FACTORY_H
 
 #include <QObject>
 #include <QString>
--- a/system/Init.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/system/Init.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _SV_SYSTEM_INIT_H_
-#define _SV_SYSTEM_INIT_H_
+#ifndef SV_SYSTEM_INIT_H
+#define SV_SYSTEM_INIT_H
 
 extern void svSystemSpecificInitialisation();
 
--- a/system/System.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/system/System.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -301,12 +301,12 @@
 #endif /* !_WIN32 */
 
 
-static char *startupLocale = 0;
+static char *startupLocale = nullptr;
 
 void
 StoreStartupLocale()
 {
-    char *loc = setlocale(LC_ALL, 0);
+    char *loc = setlocale(LC_ALL, nullptr);
     if (!loc) return;
     if (startupLocale) free(startupLocale);
     startupLocale = strdup(loc);
--- a/transform/CSVFeatureWriter.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/CSVFeatureWriter.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -174,7 +174,7 @@
         writeFeature(tt, 
                      stream,
                      features[i], 
-                     m_forceEnd ? &features[i+1] : 0,
+                     m_forceEnd ? &features[i+1] : nullptr,
                      summaryType);
     }
 }
--- a/transform/CSVFeatureWriter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/CSVFeatureWriter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -17,8 +17,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _CSV_FEATURE_WRITER_H_
-#define _CSV_FEATURE_WRITER_H_
+#ifndef SV_CSV_FEATURE_WRITER_H
+#define SV_CSV_FEATURE_WRITER_H
 
 #include <string>
 #include <map>
@@ -40,20 +40,20 @@
     CSVFeatureWriter();
     virtual ~CSVFeatureWriter();
 
-    virtual string getDescription() const;
+    string getDescription() const override;
 
-    virtual ParameterList getSupportedParameters() const;
-    virtual void setParameters(map<string, string> &params);
+    ParameterList getSupportedParameters() const override;
+    void setParameters(map<string, string> &params) override;
 
-    virtual void write(QString trackid,
+    void write(QString trackid,
                        const Transform &transform,
                        const Vamp::Plugin::OutputDescriptor &output,
                        const Vamp::Plugin::FeatureList &features,
-                       std::string summaryType = "");
+                       std::string summaryType = "") override;
 
-    virtual void finish();
+    void finish() override;
 
-    virtual QString getWriterTag() const { return "csv"; }
+    QString getWriterTag() const override { return "csv"; }
 
 private:
     QString m_separator;
--- a/transform/FeatureExtractionModelTransformer.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/FeatureExtractionModelTransformer.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -45,7 +45,7 @@
 FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(Input in,
                                                                      const Transform &transform) :
     ModelTransformer(in, transform),
-    m_plugin(0),
+    m_plugin(nullptr),
     m_haveOutputs(false)
 {
     SVDEBUG << "FeatureExtractionModelTransformer::FeatureExtractionModelTransformer: plugin " << m_transforms.begin()->getPluginIdentifier() << ", outputName " << m_transforms.begin()->getOutput() << endl;
@@ -54,7 +54,7 @@
 FeatureExtractionModelTransformer::FeatureExtractionModelTransformer(Input in,
                                                                      const Transforms &transforms) :
     ModelTransformer(in, transforms),
-    m_plugin(0),
+    m_plugin(nullptr),
     m_haveOutputs(false)
 {
     if (m_transforms.empty()) {
@@ -271,7 +271,7 @@
         SVCERR << "FeatureExtractionModelTransformer: caught exception while deleting plugin: " << e.what() << endl;
         m_message = e.what();
     }
-    m_plugin = 0;
+    m_plugin = nullptr;
         
     for (int j = 0; j < (int)m_descriptors.size(); ++j) {
         delete m_descriptors[j];
@@ -354,7 +354,7 @@
 
     bool preDurationPlugin = (m_plugin->getVampApiVersion() < 2);
 
-    Model *out = 0;
+    Model *out = nullptr;
 
     if (binCount == 0 &&
         (preDurationPlugin || !m_descriptors[n]->hasDuration)) {
@@ -589,17 +589,17 @@
 
     if (binNo == 0) {
         std::cerr << "Internal error: binNo == 0 in getAdditionalModel (should be using primary model)" << std::endl;
-        return 0;
+        return nullptr;
     }
 
-    if (!m_needAdditionalModels[n]) return 0;
-    if (!isOutput<SparseTimeValueModel>(n)) return 0;
+    if (!m_needAdditionalModels[n]) return nullptr;
+    if (!isOutput<SparseTimeValueModel>(n)) return nullptr;
     if (m_additionalModels[n][binNo]) return m_additionalModels[n][binNo];
 
     std::cerr << "getAdditionalModel(" << n << ", " << binNo << "): creating" << std::endl;
 
     SparseTimeValueModel *baseModel = getConformingOutput<SparseTimeValueModel>(n);
-    if (!baseModel) return 0;
+    if (!baseModel) return nullptr;
 
     std::cerr << "getAdditionalModel(" << n << ", " << binNo << "): (from " << baseModel << ")" << std::endl;
 
@@ -739,8 +739,8 @@
         setCompletion(j, 0);
     }
 
-    float *reals = 0;
-    float *imaginaries = 0;
+    float *reals = nullptr;
+    float *imaginaries = nullptr;
     if (frequencyDomain) {
         reals = new float[blockSize/2 + 1];
         imaginaries = new float[blockSize/2 + 1];
--- a/transform/FeatureExtractionModelTransformer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/FeatureExtractionModelTransformer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FEATURE_EXTRACTION_MODEL_TRANSFORMER_H_
-#define _FEATURE_EXTRACTION_MODEL_TRANSFORMER_H_
+#ifndef SV_FEATURE_EXTRACTION_MODEL_TRANSFORMER_H
+#define SV_FEATURE_EXTRACTION_MODEL_TRANSFORMER_H
 
 #include "ModelTransformer.h"
 
@@ -47,14 +47,14 @@
     virtual ~FeatureExtractionModelTransformer();
 
     // ModelTransformer method, retrieve the additional models
-    Models getAdditionalOutputModels();
-    bool willHaveAdditionalOutputModels();
+    Models getAdditionalOutputModels() override;
+    bool willHaveAdditionalOutputModels() override;
 
 protected:
     bool initialise();
     void deinitialise();
 
-    virtual void run();
+    void run() override;
 
     Vamp::Plugin *m_plugin;
     std::vector<Vamp::Plugin::OutputDescriptor *> m_descriptors; // per transform
@@ -80,7 +80,7 @@
     bool m_haveOutputs;
     QMutex m_outputMutex;
     QWaitCondition m_outputsCondition;
-    void awaitOutputModels();
+    void awaitOutputModels() override;
     
     // just casts:
 
--- a/transform/FeatureWriter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/FeatureWriter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -17,8 +17,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FEATURE_WRITER_H_
-#define _FEATURE_WRITER_H_
+#ifndef SV_FEATURE_WRITER_H
+#define SV_FEATURE_WRITER_H
 
 #include <string>
 #include <map>
@@ -72,7 +72,7 @@
             m_transformId(transformId)
         { }
         virtual ~FailedToOpenOutputStream() throw() { }
-        virtual const char *what() const throw() {
+        const char *what() const throw() override {
             return QString("Failed to open output stream for track id \"%1\", transform id \"%2\"")
                 .arg(m_trackId).arg(m_transformId).toLocal8Bit().data();
         }            
--- a/transform/FileFeatureWriter.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/FileFeatureWriter.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -32,7 +32,7 @@
 
 FileFeatureWriter::FileFeatureWriter(int support,
                                      QString extension) :
-    m_prevstream(0),
+    m_prevstream(nullptr),
     m_support(support),
     m_extension(extension),
     m_manyFiles(false),
@@ -284,7 +284,7 @@
         QString filename = createOutputFilename(trackId, transformId);
 
         if (filename == "") { // stdout or failure
-            return 0;
+            return nullptr;
         }
 
         SVDEBUG << "FileFeatureWriter: NOTE: Using output filename \""
@@ -303,7 +303,7 @@
             SVCERR << "FileFeatureWriter: ERROR: Failed to open output file \"" << filename
                  << "\" for writing" << endl;
             delete file;
-            m_files[key] = 0;
+            m_files[key] = nullptr;
             throw FailedToOpenFile(filename);
         }
         
@@ -320,7 +320,7 @@
 {
     QFile *file = getOutputFile(trackId, transformId);
     if (!file && !m_stdout) {
-        return 0;
+        return nullptr;
     }
     
     if (m_streams.find(file) == m_streams.end()) {
@@ -372,6 +372,6 @@
         }
         m_files.erase(m_files.begin());
     }
-    m_prevstream = 0;
+    m_prevstream = nullptr;
 }
 
--- a/transform/FileFeatureWriter.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/FileFeatureWriter.h	Wed Jan 09 15:24:38 2019 +0000
@@ -17,8 +17,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _FILE_FEATURE_WRITER_H_
-#define _FILE_FEATURE_WRITER_H_
+#ifndef SV_FILE_FEATURE_WRITER_H
+#define SV_FILE_FEATURE_WRITER_H
 
 #include <string>
 #include <map>
@@ -40,12 +40,12 @@
 public:
     virtual ~FileFeatureWriter();
 
-    virtual ParameterList getSupportedParameters() const;
-    virtual void setParameters(map<string, string> &params);
+    ParameterList getSupportedParameters() const override;
+    void setParameters(map<string, string> &params) override;
 
-    virtual void testOutputFile(QString trackId, TransformId transformId);
-    virtual void flush();
-    virtual void finish();
+    void testOutputFile(QString trackId, TransformId transformId) override;
+    void flush() override;
+    void finish() override;
 
 protected:
     enum FileWriteSupport {
--- a/transform/ModelTransformerFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/ModelTransformerFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -59,7 +59,7 @@
                                                       sv_frame_t duration,
                                                       UserConfigurator *configurator)
 {
-    ModelTransformer::Input input(0);
+    ModelTransformer::Input input(nullptr);
 
     if (candidateInputModels.empty()) return input;
 
@@ -91,7 +91,7 @@
 
     SVDEBUG << "ModelTransformer: last configuration for identifier " << transform.getIdentifier() << ": " << configurationXml << endl;
 
-    Vamp::PluginBase *plugin = 0;
+    Vamp::PluginBase *plugin = nullptr;
 
     if (RealTimePluginFactory::instanceFor(id)) {
 
@@ -171,7 +171,7 @@
 ModelTransformerFactory::createTransformer(const Transforms &transforms,
                                            const ModelTransformer::Input &input)
 {
-    ModelTransformer *transformer = 0;
+    ModelTransformer *transformer = nullptr;
 
     QString id = transforms[0].getPluginIdentifier();
 
@@ -201,7 +201,7 @@
     Transforms transforms;
     transforms.push_back(transform);
     vector<Model *> mm = transformMultiple(transforms, input, message, handler);
-    if (mm.empty()) return 0;
+    if (mm.empty()) return nullptr;
     else return mm[0];
 }
 
--- a/transform/ModelTransformerFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/ModelTransformerFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _MODEL_TRANSFORMER_FACTORY_H_
-#define _MODEL_TRANSFORMER_FACTORY_H_
+#ifndef SV_MODEL_TRANSFORMER_FACTORY_H
+#define SV_MODEL_TRANSFORMER_FACTORY_H
 
 #include "Transform.h"
 #include "TransformDescription.h"
--- a/transform/RealTimeEffectModelTransformer.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/RealTimeEffectModelTransformer.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -32,7 +32,7 @@
 RealTimeEffectModelTransformer::RealTimeEffectModelTransformer(Input in,
                                                                const Transform &t) :
     ModelTransformer(in, t),
-    m_plugin(0)
+    m_plugin(nullptr)
 {
     Transform transform(t);
     if (!transform.getBlockSize()) {
--- a/transform/RealTimeEffectModelTransformer.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/RealTimeEffectModelTransformer.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _REAL_TIME_EFFECT_TRANSFORMER_H_
-#define _REAL_TIME_EFFECT_TRANSFORMER_H_
+#ifndef SV_REAL_TIME_EFFECT_TRANSFORMER_H
+#define SV_REAL_TIME_EFFECT_TRANSFORMER_H
 
 #include "ModelTransformer.h"
 #include "plugin/RealTimePluginInstance.h"
@@ -29,9 +29,9 @@
     virtual ~RealTimeEffectModelTransformer();
 
 protected:
-    virtual void run();
+    void run() override;
 
-    virtual void awaitOutputModels() { } // they're created synchronously
+    void awaitOutputModels() override { } // they're created synchronously
     
     QString m_units;
     RealTimePluginInstance *m_plugin;
--- a/transform/Transform.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/Transform.h	Wed Jan 09 15:24:38 2019 +0000
@@ -13,8 +13,8 @@
     COPYING included with this distribution for more information.
 */
 
-#ifndef _TRANSFORM_H_
-#define _TRANSFORM_H_
+#ifndef SV_TRANSFORM_H
+#define SV_TRANSFORM_H
 
 #include "base/XmlExportable.h"
 #include "base/Window.h"
@@ -140,7 +140,7 @@
     void setSampleRate(sv_samplerate_t rate);
 
     void toXml(QTextStream &stream, QString indent = "",
-               QString extraAttributes = "") const;
+               QString extraAttributes = "") const override;
 
     /**
      * Set the main transform data from the given XML attributes.
--- a/transform/TransformFactory.cpp	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/TransformFactory.cpp	Wed Jan 09 15:24:38 2019 +0000
@@ -55,13 +55,13 @@
 {
     SVDEBUG << "TransformFactory::deleteInstance called" << endl;
     delete m_instance;
-    m_instance = 0;
+    m_instance = nullptr;
 }
 
 TransformFactory::TransformFactory() :
     m_transformsPopulated(false),
     m_uninstalledTransformsPopulated(false),
-    m_thread(0),
+    m_thread(nullptr),
     m_exiting(false),
     m_populatingSlowly(false)
 {
@@ -790,7 +790,7 @@
     if (rate == 0) rate = 44100.0;
     QString pluginId = t.getPluginIdentifier();
 
-    Vamp::PluginBase *plugin = 0;
+    Vamp::PluginBase *plugin = nullptr;
 
     if (t.getType() == Transform::FeatureExtraction) {
 
--- a/transform/TransformFactory.h	Wed Jan 09 14:39:50 2019 +0000
+++ b/transform/TransformFactory.h	Wed Jan 09 15:24:38 2019 +0000
@@ -226,7 +226,7 @@
         UninstalledTransformsPopulateThread(TransformFactory *factory) :
             m_factory(factory) {
         }
-        virtual void run();
+        void run() override;
         TransformFactory *m_factory;
     };