Changeset 3449


Ignore:
Timestamp:
Dec 7, 2015, 7:22:17 AM (6 years ago)
Author:
Peter
Message:

remove extra spaces

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/test/segment.cc

    r3360 r3449  
    3636void test_insert_merge(test::Suite&);
    3737void test_segment(test::Suite& suite);
     38void test_operator(test::Suite& suite);
    3839void test_segment_map(test::Suite& suite);
    3940void test_set_bound(test::Suite&);
     
    283284  Segment<double> segment12(0,2);
    284285  Segment<double> segment13(1,3);
     286  if (segment12==segment13) {
     287    suite.add(false);
     288    suite.err() << "segment12==segment13 : expected false\n";
     289  }
     290  if (!(segment12!=segment13)) {
     291    suite.add(false);
     292    suite.err() << "segment12!=segment13 : expected true\n";
     293  }
    285294  Segment<double> segment14 = intersection(segment12, segment13);
    286295  suite.add(segment14.begin()==1);
  • trunk/yat/utility/Segment.h

    r2358 r3449  
    4040     comparator Compare, which should implement <a
    4141     href="http://www.sgi.com/tech/stl/StrictWeakOrdering.html">
    42      Strict Weak Ordering.</a>.   
     42     Strict Weak Ordering.</a>.
    4343
    4444     \since new in yat 0.7
     
    8585     */
    8686    const T& end(void) const { return end_; }
    87    
     87
    8888  private:
    8989    T begin_;
    9090    T end_;
    91    
     91
    9292    // using compiler generated copying
    9393    //Segment(const Segment&);
     
    136136   */
    137137  template<typename T, class Compare>
    138   int compare_3way(const Segment<T, Compare>& lhs, 
     138  int compare_3way(const Segment<T, Compare>& lhs,
    139139                   const Segment<T, Compare>& rhs)
    140140  {
     
    155155   */
    156156  template<typename T, class Compare>
    157   int compare_3way(const T& element, 
     157  int compare_3way(const T& element,
    158158                   const Segment<T, Compare>& segment)
    159159  {
     
    176176   */
    177177  template<typename T, class Compare>
    178   Segment<T, Compare> intersection(const Segment<T, Compare>& a, 
     178  Segment<T, Compare> intersection(const Segment<T, Compare>& a,
    179179                                   const Segment<T, Compare>& b)
    180180  {
     
    184184    result.begin() = std::max(a.begin(), b.begin(), comp);
    185185    // the first max is needed in case a and b don't overlap
    186     result.end() = std::max(result.begin(), 
     186    result.end() = std::max(result.begin(),
    187187                            std::min(a.end(), b.end(), comp),
    188188                            comp);
     
    194194   */
    195195  template<typename T, class Compare>
    196   struct SegmentCompare : 
     196  struct SegmentCompare :
    197197    public std::binary_function<Segment<T,Compare>, Segment<T,Compare>, bool>
    198198  {
     
    200200       \see compare(const Segment<T,Compare>&, const Segment<T,Compare>&)
    201201     */
    202     bool operator()(const Segment<T, Compare>& lhs, 
     202    bool operator()(const Segment<T, Compare>& lhs,
    203203                    const Segment<T, Compare>& rhs) const
    204204    { return compare(lhs, rhs); }
Note: See TracChangeset for help on using the changeset viewer.