mirror of
https://github.com/Ardour/ardour.git
synced 2025-12-10 16:46:35 +01:00
remove TempoMap::count_bars()
It's the only place in libtemporal that would require a TempoMapPoints allocation, and there's no reason to do this inside the library.
This commit is contained in:
parent
52f1b88749
commit
039f2d5d0e
2 changed files with 1 additions and 12 deletions
|
|
@ -2765,16 +2765,6 @@ TempoMap::get_grid (TempoMapPoints& ret, superclock_t rstart, superclock_t end,
|
||||||
DEBUG_TRACE (DEBUG::Grid, "<<< GRID DONE\n");
|
DEBUG_TRACE (DEBUG::Grid, "<<< GRID DONE\n");
|
||||||
}
|
}
|
||||||
|
|
||||||
uint32_t
|
|
||||||
TempoMap::count_bars (Beats const & start, Beats const & end) const
|
|
||||||
{
|
|
||||||
TempoMapPoints bar_grid;
|
|
||||||
superclock_t s (superclock_at (start));
|
|
||||||
superclock_t e (superclock_at (end));
|
|
||||||
get_grid (bar_grid, s, e, 1);
|
|
||||||
return bar_grid.size();
|
|
||||||
}
|
|
||||||
|
|
||||||
std::ostream&
|
std::ostream&
|
||||||
std::operator<<(std::ostream& str, Meter const & m)
|
std::operator<<(std::ostream& str, Meter const & m)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -647,7 +647,7 @@ class LIBTEMPORAL_API TempoMapPoint : public Point, public TempoMetric
|
||||||
bool _floating;
|
bool _floating;
|
||||||
};
|
};
|
||||||
|
|
||||||
typedef std::list<TempoMapPoint> TempoMapPoints;
|
typedef std::vector<TempoMapPoint> TempoMapPoints;
|
||||||
|
|
||||||
class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
||||||
{
|
{
|
||||||
|
|
@ -913,7 +913,6 @@ class /*LIBTEMPORAL_API*/ TempoMap : public PBD::StatefulDestructible
|
||||||
LIBTEMPORAL_API BBT_Argument bbt_walk (BBT_Argument const &, BBT_Offset const &) const;
|
LIBTEMPORAL_API BBT_Argument bbt_walk (BBT_Argument const &, BBT_Offset const &) const;
|
||||||
|
|
||||||
LIBTEMPORAL_API void get_grid (TempoMapPoints & points, superclock_t start, superclock_t end, uint32_t bar_mod = 0, uint32_t beat_div = 1) const;
|
LIBTEMPORAL_API void get_grid (TempoMapPoints & points, superclock_t start, superclock_t end, uint32_t bar_mod = 0, uint32_t beat_div = 1) const;
|
||||||
LIBTEMPORAL_API uint32_t count_bars (Beats const & start, Beats const & end) const;
|
|
||||||
|
|
||||||
struct EmptyTempoMapException : public std::exception {
|
struct EmptyTempoMapException : public std::exception {
|
||||||
virtual const char* what() const throw() { return "TempoMap is empty"; }
|
virtual const char* what() const throw() { return "TempoMap is empty"; }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue