Changeset 8077:f7a6c85b3749 in orange


Ignore:
Timestamp:
07/05/11 15:53:12 (3 years ago)
Author:
ales_erjavec <ales.erjavec@…>
Branch:
default
Convert:
fa8bdee8a1a8a7da7ff2ea4d892f5d2ef9f69878
Message:

Fixed compiling with on Windows.

Location:
source/orange
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • source/orange/hclust.cpp

    r8070 r8077  
    568568{} 
    569569 
    570 bool m_element::operator< (const m_element & other) 
     570bool m_element::operator< (const m_element & other) const 
    571571{ 
    572572    if (cluster < other.cluster) 
     
    625625struct CompareByScores 
    626626{ 
    627     const join_scores & scores; 
     627    join_scores & scores; 
    628628    const THierarchicalCluster & cluster; 
    629629    const int & fixed; 
    630630 
    631     CompareByScores(const join_scores & _scores, const THierarchicalCluster & _cluster, const int & _fixed): 
     631    CompareByScores(join_scores & _scores, const THierarchicalCluster & _cluster, const int & _fixed): 
    632632        scores(_scores), cluster(_cluster), fixed(_fixed) 
    633633    {} 
    634634    bool operator() (int lhs, int rhs) 
    635635    { 
    636         return scores[m_element(&cluster, fixed, lhs)] < scores[m_element(&cluster, fixed, rhs)]; 
     636        m_element left((THierarchicalCluster*)&cluster, fixed, lhs); 
     637        m_element right((THierarchicalCluster*)&cluster, fixed, rhs); 
     638        return scores[left] < scores[right]; 
    637639    } 
    638640}; 
  • source/orange/hclust.hpp

    r8070 r8077  
    102102    m_element(const m_element & other); 
    103103 
    104     bool operator< (const m_element & other); 
     104    bool operator< (const m_element & other) const; 
    105105}; // cluster joined at left and right index 
    106106 
Note: See TracChangeset for help on using the changeset viewer.