Kaydet (Commit) 85bee973 authored tarafından Tor Lillqvist's avatar Tor Lillqvist

Work around limitation in the debug version of the MSVC std::lower_bound

üst b0eea6c3
...@@ -2391,10 +2391,12 @@ namespace svt { namespace table ...@@ -2391,10 +2391,12 @@ namespace svt { namespace table
long const ordinate = i_ordinate - m_nRowHeaderWidthPixel; long const ordinate = i_ordinate - m_nRowHeaderWidthPixel;
MutableColumnMetrics aOrdinateColumn(ordinate+1, ordinate+1);
ColumnPositions::const_iterator lowerBound = ::std::lower_bound( ColumnPositions::const_iterator lowerBound = ::std::lower_bound(
m_aColumnWidths.begin(), m_aColumnWidths.begin(),
m_aColumnWidths.end(), m_aColumnWidths.end(),
ordinate + 1, MutableColumnMetrics(ordinate+1, ordinate+1),
ColumnInfoPositionLess() ColumnInfoPositionLess()
); );
if ( lowerBound == m_aColumnWidths.end() ) if ( lowerBound == m_aColumnWidths.end() )
......
...@@ -72,13 +72,9 @@ namespace svt { namespace table ...@@ -72,13 +72,9 @@ namespace svt { namespace table
struct ColumnInfoPositionLess struct ColumnInfoPositionLess
{ {
bool operator()( MutableColumnMetrics const& i_colInfo, long const i_position ) bool operator()( MutableColumnMetrics const& i_lhs, MutableColumnMetrics const& i_rhs )
{ {
return i_colInfo.getEnd() < i_position; return i_lhs.getEnd() < i_rhs.getStart();
}
bool operator()( long const i_position, MutableColumnMetrics const& i_colInfo )
{
return i_position < i_colInfo.getStart();
} }
}; };
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment