Changeset 1330
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/FilePrinter.cc
r1321 r1330 118 118 } 119 119 else { 120 first = Graph:: xticks()[Graph::rev_min()];121 assert(Graph::rev_max()<Graph:: xticks().size());122 last = Graph:: xticks()[Graph::rev_max()];120 first = Graph::dates()[Graph::rev_min()]; 121 assert(Graph::rev_max()<Graph::dates().size()); 122 last = Graph::dates()[Graph::rev_max()]; 123 123 } 124 124 assert(last>first); -
trunk/lib/Graph.cc
r1329 r1330 35 35 svn_revnum_t Graph::rev_max_=0; 36 36 svn_revnum_t Graph::rev_min_=0; 37 std::vector<time_t> Graph:: xticks_;37 std::vector<time_t> Graph::dates_; 38 38 39 39 Graph::Graph(const std::string& filename, const std::string& format) … … 66 66 bool Graph::date_xticks(void) 67 67 { 68 return xticks_.size() != 0;68 return dates_.size() != 0; 69 69 } 70 70 … … 93 93 #ifdef HAVE_PLPLOT 94 94 if (!plots_) { 95 assert(!date_xticks() || rev_min_< xticks_.size());96 assert(!date_xticks() || xticks_[rev_min_]);97 assert(rev_min_< xticks_.size() || !date_xticks());98 xmin_= date_xticks() ? xticks_[rev_min_] : rev_min_;99 assert(rev_max_< xticks_.size() || !date_xticks());100 xmax_= date_xticks() ? xticks_[rev_max_] : rev_max_;95 assert(!date_xticks() || rev_min_<dates_.size()); 96 assert(!date_xticks() || dates_[rev_min_]); 97 assert(rev_min_<dates_.size() || !date_xticks()); 98 xmin_= date_xticks() ? dates_[rev_min_] : rev_min_; 99 assert(rev_max_<dates_.size() || !date_xticks()); 100 xmax_= date_xticks() ? dates_[rev_max_] : rev_max_; 101 101 xrange_=xmax_-xmin_; 102 102 yrange_=ymax_-ymin_; … … 192 192 void Graph::set_dates(const std::vector<time_t>& date) 193 193 { 194 xticks_=date;194 dates_=date; 195 195 } 196 196 … … 202 202 PLFLT x1 = rev1; 203 203 if (date_xticks()) { 204 assert(rev0< xticks_.size());205 assert( xticks_[rev0]);206 x0 = xticks_[rev0];207 assert(rev1< xticks_.size());208 assert( xticks_[rev1]);209 x1 = xticks_[rev1];204 assert(rev0<dates_.size()); 205 assert(dates_[rev0]); 206 x0 = dates_[rev0]; 207 assert(rev1<dates_.size()); 208 assert(dates_[rev1]); 209 x1 = dates_[rev1]; 210 210 } 211 211 #ifdef HAVE_PLPLOT … … 231 231 232 232 233 const std::vector<time_t>& Graph:: xticks(void)234 { 235 return xticks_;233 const std::vector<time_t>& Graph::dates(void) 234 { 235 return dates_; 236 236 } 237 237 -
trunk/lib/Graph.h
r1327 r1330 128 128 /** 129 129 */ 130 static const std::vector<time_t>& xticks(void);130 static const std::vector<time_t>& dates(void); 131 131 132 132 /** … … 165 165 static svn_revnum_t rev_max_; 166 166 std::string title_; 167 static std::vector<time_t> xticks_;167 static std::vector<time_t> dates_; 168 168 PLFLT xmin_, xmax_, xrange_, ymin_, ymax_, yrange_; 169 169 };
Note: See TracChangeset
for help on using the changeset viewer.