summaryrefslogtreecommitdiff
path: root/libs/evoral/evoral
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-12-04 13:20:15 -0500
committerDavid Robillard <d@drobilla.net>2016-12-04 15:10:05 -0500
commit7d2ed46b63821cc9d9bdd5d2366eaaf00726d3fc (patch)
tree4d6213a2b5d8cab19427117386c9ef169706d75e /libs/evoral/evoral
parent11464bfb183b56ec3aafae9c173e78a352929bd9 (diff)
Remove dead/annoying/unsafe code
Note the old Note::operator= was unsafe, since it made shallow copies of the on and off events, which results in a double delete of events when the notes are destructed.
Diffstat (limited to 'libs/evoral/evoral')
-rw-r--r--libs/evoral/evoral/Curve.hpp5
-rw-r--r--libs/evoral/evoral/Note.hpp4
-rw-r--r--libs/evoral/evoral/Range.hpp2
3 files changed, 2 insertions, 9 deletions
diff --git a/libs/evoral/evoral/Curve.hpp b/libs/evoral/evoral/Curve.hpp
index 6aeeb039d7..bf2de520a0 100644
--- a/libs/evoral/evoral/Curve.hpp
+++ b/libs/evoral/evoral/Curve.hpp
@@ -41,7 +41,6 @@ public:
void mark_dirty() const { _dirty = true; }
private:
- double unlocked_eval (double where);
double multipoint_eval (double x);
void _get_vector (double x0, double x1, float *arg, int32_t veclen);
@@ -52,9 +51,5 @@ private:
} // namespace Evoral
-extern "C" {
- LIBEVORAL_API void curve_get_vector_from_c (void *arg, double, double, float*, int32_t);
-}
-
#endif // EVORAL_CURVE_HPP
diff --git a/libs/evoral/evoral/Note.hpp b/libs/evoral/evoral/Note.hpp
index 43db728b0c..88d4077af9 100644
--- a/libs/evoral/evoral/Note.hpp
+++ b/libs/evoral/evoral/Note.hpp
@@ -43,8 +43,6 @@ public:
Note(const Note<Time>& copy);
~Note();
- const Note<Time>& operator=(const Note<Time>& copy);
-
inline bool operator==(const Note<Time>& other) {
return time() == other.time() &&
note() == other.note() &&
@@ -69,6 +67,8 @@ public:
}
private:
+ const Note<Time>& operator=(const Note<Time>& copy); // undefined (unsafe)
+
inline int clamp(int val, int low, int high) {
return std::min (std::max (val, low), high);
}
diff --git a/libs/evoral/evoral/Range.hpp b/libs/evoral/evoral/Range.hpp
index e2ac87e909..20020115ac 100644
--- a/libs/evoral/evoral/Range.hpp
+++ b/libs/evoral/evoral/Range.hpp
@@ -78,13 +78,11 @@ template<typename T>
if (sa > ea) {
// seems we are sometimes called with negative length ranges
- std::cerr << "a - start after end: " << sa << ", " << ea << std::endl;
return OverlapNone;
}
if (sb > eb) {
// seems we are sometimes called with negative length ranges
- std::cerr << "b - start after end: " << sb << ", " << eb << std::endl;
return OverlapNone;
}