Changeset 1280 for trunk/lib/Graph.cc


Ignore:
Timestamp:
Nov 6, 2010, 3:45:23 PM (11 years ago)
Author:
Peter Johansson
Message:

merged release 0.9 in to trunk

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

  • trunk/lib/Graph.cc

    r1267 r1280  
    3232namespace svndigest {
    3333
     34  svn_revnum_t Graph::rev_max_=0;
    3435  svn_revnum_t Graph::rev_min_=0;
    3536  std::vector<time_t> Graph::xticks_;
     
    9394      assert(!date_xticks() || rev_min_<xticks_.size());
    9495      assert(!date_xticks() || xticks_[rev_min_]);
    95       xmin_= date_xticks() ? xticks_[rev_min_] : 0;
    96       xmax_= date_xticks() ? xticks_.back() : y.size();
     96      assert(rev_min_<xticks_.size() || !date_xticks());
     97      xmin_= date_xticks() ? xticks_[rev_min_] : rev_min_;
     98      assert(rev_max_<xticks_.size() || !date_xticks());
     99      xmax_= date_xticks() ? xticks_[rev_max_] : rev_max_;
    97100      xrange_=xmax_-xmin_;
    98101      yrange_=ymax_-ymin_;
     
    126129      y0 = iter->second;
    127130    }
    128     staircase(x0, y0, y.size()-1, y0);
     131    staircase(x0, y0, rev_max_, y0);
    129132
    130133    legend_data legend;
     
    164167
    165168
     169  void Graph::rev_max(svn_revnum_t rev)
     170  {
     171    rev_max_ = rev;
     172  }
     173
     174
    166175  void Graph::rev_min(svn_revnum_t rev)
    167176  {
Note: See TracChangeset for help on using the changeset viewer.