From 15276f365c15527fbb10d42e3f5896f540de7413 Mon Sep 17 00:00:00 2001 From: Darrell Anderson Date: Fri, 13 Apr 2012 16:16:01 -0500 Subject: Updated to build with gcc 4.7. --- src/base/Sets.h | 44 ++++++++++++++++++++++---------------------- 1 file changed, 22 insertions(+), 22 deletions(-) (limited to 'src/base/Sets.h') diff --git a/src/base/Sets.h b/src/base/Sets.h index 4fe14d1..2a59ed0 100644 --- a/src/base/Sets.h +++ b/src/base/Sets.h @@ -287,7 +287,7 @@ AbstractSet::initialise() m_final = m_baseIterator; sample(m_baseIterator, true); - if (getAsEvent(m_baseIterator)->isa(Note::EventType)) { + if (AbstractSet::getAsEvent(m_baseIterator)->isa(Note::EventType)) { m_initialNote = m_baseIterator; m_finalNote = m_baseIterator; } @@ -300,7 +300,7 @@ AbstractSet::initialise() for (i = j = m_baseIterator; i != getContainer().begin() && test(--j); i = j){ if (sample(j, false)) { m_initial = j; - if (getAsEvent(j)->isa(Note::EventType)) { + if (AbstractSet::getAsEvent(j)->isa(Note::EventType)) { m_initialNote = j; if (m_finalNote == getContainer().end()) { m_finalNote = j; @@ -317,7 +317,7 @@ AbstractSet::initialise() for (i = j = m_baseIterator; ++j != getContainer().end() && test(j); i = j) { if (sample(j, true)) { m_final = j; - if (getAsEvent(j)->isa(Note::EventType)) { + if (AbstractSet::getAsEvent(j)->isa(Note::EventType)) { m_finalNote = j; if (m_initialNote == getContainer().end()) { m_initialNote = j; @@ -332,17 +332,17 @@ bool AbstractSet::sample(const Iterator &i, bool) { const Quantizer &q(getQuantizer()); - Event *e = getAsEvent(i); + Event *e = AbstractSet::getAsEvent(i); timeT d(q.getQuantizedDuration(e)); if (e->isa(Note::EventType) || d > 0) { if (m_longest == getContainer().end() || - d > q.getQuantizedDuration(getAsEvent(m_longest))) { + d > q.getQuantizedDuration(AbstractSet::getAsEvent(m_longest))) { // std::cerr << "New longest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl; m_longest = i; } if (m_shortest == getContainer().end() || - d < q.getQuantizedDuration(getAsEvent(m_shortest))) { + d < q.getQuantizedDuration(AbstractSet::getAsEvent(m_shortest))) { // std::cerr << "New shortest in set at duration " << d << " and time " << e->getAbsoluteTime() << std::endl; m_shortest = i; } @@ -352,12 +352,12 @@ AbstractSet::sample(const Iterator &i, bool) long p = get__Int(e, BaseProperties::PITCH); if (m_highest == getContainer().end() || - p > get__Int(getAsEvent(m_highest), BaseProperties::PITCH)) { + p > get__Int(AbstractSet::getAsEvent(m_highest), BaseProperties::PITCH)) { // std::cerr << "New highest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl; m_highest = i; } if (m_lowest == getContainer().end() || - p < get__Int(getAsEvent(m_lowest), BaseProperties::PITCH)) { + p < get__Int(AbstractSet::getAsEvent(m_lowest), BaseProperties::PITCH)) { // std::cerr << "New lowest in set at pitch " << p << " and time " << e->getAbsoluteTime() << std::endl; m_lowest = i; } @@ -376,8 +376,8 @@ GenericChord::GenericChord(Container &c, PropertyName stemUpProperty) : AbstractSet(c, i, q), m_stemUpProperty(stemUpProperty), - m_time(q->getQuantizedAbsoluteTime(getAsEvent(i))), - m_subordering(getAsEvent(i)->getSubOrdering()), + m_time(q->getQuantizedAbsoluteTime(GenericChord::getAsEvent(i))), + m_subordering(GenericChord::getAsEvent(i)->getSubOrdering()), m_firstReject(c.end()) { AbstractSet::initialise(); @@ -416,7 +416,7 @@ template bool GenericChord::test(const Iterator &i) { - Event *e = getAsEvent(i); + Event *e = GenericChord::getAsEvent(i); if (AbstractSet:: getQuantizer().getQuantizedAbsoluteTime(e) != m_time) { return false; @@ -452,7 +452,7 @@ bool GenericChord::sample(const Iterator &i, bool goingForwards) { - Event *e1 = getAsEvent(i); + Event *e1 = GenericChord::getAsEvent(i); if (!e1->isa(Note::EventType)) { if (goingForwards && m_firstReject == AbstractSet::getContainer().end()) m_firstReject = i; return false; @@ -472,7 +472,7 @@ GenericChord::sample(const Iterator &i, if (AbstractSet::m_baseIterator != AbstractSet::getContainer().end()) { - Event *e0 = getAsEvent(AbstractSet::m_baseIterator); + Event *e0 = GenericChord::getAsEvent(AbstractSet::m_baseIterator); if (!(m_stemUpProperty == PropertyName::EmptyPropertyName)) { @@ -518,7 +518,7 @@ GenericChord::sample(const Iterator &i, } AbstractSet::sample(i, goingForwards); - push_back(i); + this->push_back(i); return true; } @@ -560,7 +560,7 @@ GenericChord::getMarkCountForChord() const for (unsigned int i = 0; i < std::vector::size(); ++i) { - Event *e = getAsEvent((*this)[i]); + Event *e = GenericChord::getAsEvent((*this)[i]); std::vector marks(Marks::getMarks(*e)); for (std::vector::iterator j = marks.begin(); j != marks.end(); ++j) { @@ -580,7 +580,7 @@ GenericChord::getMarksForChord() const for (unsigned int i = 0; i < std::vector::size(); ++i) { - Event *e = getAsEvent((*this)[i]); + Event *e = GenericChord::getAsEvent((*this)[i]); std::vector marks(Marks::getMarks(*e)); @@ -607,9 +607,9 @@ GenericChord::getPitches() const for (typename std::vector::const_iterator i = std::vector::begin(); i != std::vector::end(); ++i) { - if (getAsEvent(*i)->has(BaseProperties::PITCH)) { + if (GenericChord::getAsEvent(*i)->has(BaseProperties::PITCH)) { int pitch = get__Int - (getAsEvent(*i), BaseProperties::PITCH); + (GenericChord::getAsEvent(*i), BaseProperties::PITCH); if (pitches.size() > 0 && pitches[pitches.size()-1] == pitch) continue; pitches.push_back(pitch); @@ -641,7 +641,7 @@ GenericChord::getPreviousNote() while (1) { if (i == AbstractSet::getContainer().begin()) return AbstractSet::getContainer().end(); --i; - if (getAsEvent(i)->isa(Note::EventType)) { + if (GenericChord::getAsEvent(i)->isa(Note::EventType)) { return i; } } @@ -655,7 +655,7 @@ GenericChord::getNextNote() Iterator i(AbstractSet::getFinalElement()); while ( i != AbstractSet::getContainer().end() && ++i != AbstractSet::getContainer().end()) { - if (getAsEvent(i)->isa(Note::EventType)) { + if (GenericChord::getAsEvent(i)->isa(Note::EventType)) { return i; } } @@ -677,8 +677,8 @@ GenericChord::PitchGreater::operator()(const It const Iterator &b) { try { - long ap = get__Int(getAsEvent(a), BaseProperties::PITCH); - long bp = get__Int(getAsEvent(b), BaseProperties::PITCH); + long ap = get__Int(GenericChord::getAsEvent(a), BaseProperties::PITCH); + long bp = get__Int(GenericChord::getAsEvent(b), BaseProperties::PITCH); return (ap < bp); } catch (Event::NoData) { std::cerr << "Bad karma: PitchGreater failed to find one or both pitches" << std::endl; -- cgit v1.2.1