diff options
author | Robin Gareus <robin@gareus.org> | 2019-09-18 04:43:09 +0200 |
---|---|---|
committer | Robin Gareus <robin@gareus.org> | 2019-09-18 04:43:09 +0200 |
commit | 60bce78c7e06676917c52dc0e62c2d92169d391e (patch) | |
tree | 308d760558f438e0e5483fdb43cd6527f9238782 /libs/evoral | |
parent | bf806cde661fb4e2ebbf8ec54a636de181d16301 (diff) |
Fix Wdeprecated, dynamic exception
Dynamic exception specifications are deprecated in C++11,
and were removed in C++17.
Diffstat (limited to 'libs/evoral')
-rw-r--r-- | libs/evoral/evoral/SMF.hpp | 10 | ||||
-rw-r--r-- | libs/evoral/src/SMF.cpp | 8 | ||||
-rw-r--r-- | libs/evoral/test/SMFTest.hpp | 4 |
3 files changed, 10 insertions, 12 deletions
diff --git a/libs/evoral/evoral/SMF.hpp b/libs/evoral/evoral/SMF.hpp index 352c1fbf7c..4888ba6a60 100644 --- a/libs/evoral/evoral/SMF.hpp +++ b/libs/evoral/evoral/SMF.hpp @@ -37,8 +37,6 @@ typedef smf_tempo_struct smf_tempo_t; namespace Evoral { -#define THROW_FILE_ERROR throw(FileError) - /** Standard Midi File. * Currently only tempo-based time of a given PPQN is supported. * @@ -66,10 +64,10 @@ public: virtual ~SMF(); static bool test(const std::string& path); - int open(const std::string& path, int track=1) THROW_FILE_ERROR; + int open(const std::string& path, int track=1); // XXX 19200 = 10 * Timecode::BBT_Time::ticks_per_beat - int create(const std::string& path, int track=1, uint16_t ppqn=19200) THROW_FILE_ERROR; - void close() THROW_FILE_ERROR; + int create(const std::string& path, int track=1, uint16_t ppqn=19200); + void close(); void seek_to_start() const; int seek_to_track(int track); @@ -82,7 +80,7 @@ public: void begin_write(); void append_event_delta(uint32_t delta_t, uint32_t size, const uint8_t* buf, event_id_t note_id); - void end_write(std::string const &) THROW_FILE_ERROR; + void end_write(std::string const &); void flush() {}; diff --git a/libs/evoral/src/SMF.cpp b/libs/evoral/src/SMF.cpp index 9be3a295a8..8297429dc1 100644 --- a/libs/evoral/src/SMF.cpp +++ b/libs/evoral/src/SMF.cpp @@ -116,7 +116,7 @@ SMF::test(const std::string& path) * -2 if the file exists but specified track does not exist */ int -SMF::open(const std::string& path, int track) THROW_FILE_ERROR +SMF::open(const std::string& path, int track) { Glib::Threads::Mutex::Lock lm (_smf_lock); @@ -187,7 +187,7 @@ SMF::open(const std::string& path, int track) THROW_FILE_ERROR * -2 if the track can not be created */ int -SMF::create(const std::string& path, int track, uint16_t ppqn) THROW_FILE_ERROR +SMF::create(const std::string& path, int track, uint16_t ppqn) { Glib::Threads::Mutex::Lock lm (_smf_lock); @@ -243,7 +243,7 @@ SMF::create(const std::string& path, int track, uint16_t ppqn) THROW_FILE_ERROR } void -SMF::close() THROW_FILE_ERROR +SMF::close() { Glib::Threads::Mutex::Lock lm (_smf_lock); @@ -470,7 +470,7 @@ SMF::begin_write() } void -SMF::end_write(string const & path) THROW_FILE_ERROR +SMF::end_write(string const & path) { Glib::Threads::Mutex::Lock lm (_smf_lock); diff --git a/libs/evoral/test/SMFTest.hpp b/libs/evoral/test/SMFTest.hpp index 8d6db113b1..d3f01c3607 100644 --- a/libs/evoral/test/SMFTest.hpp +++ b/libs/evoral/test/SMFTest.hpp @@ -33,12 +33,12 @@ class TestSMF : public SMF { public: std::string path() const { return _path; } - int open(const std::string& path) THROW_FILE_ERROR { + int open(const std::string& path) { _path = path; return SMF::open(path); } - void close() THROW_FILE_ERROR { + void close() { return SMF::close(); } |