void Slider::SetMarks( const MarkList& marks )
{
- float value;
- for( MarkList::const_iterator it = marks.begin(), itEnd = marks.end(); it != itEnd; ++it )
- {
- const Property::Value& propertyValue = *it;
- propertyValue.Get( value );
-
- mMarks.push_back( value );
- }
+ mMarks = marks;
}
const Slider::MarkList& Slider::GetMarks() const
const float MARK_TOLERANCE = GetMarkTolerance();
float mark;
- for( MarkList::iterator it = mMarks.begin(), itEnd = mMarks.end(); it != itEnd; ++it )
+ for( std::size_t i = 0; i < mMarks.Size(); ++i)
{
- const Property::Value& propertyValue = *it;
+ const Property::Value& propertyValue = mMarks[i];
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
float closestDist = std::numeric_limits<float>::max();
float mark;
- for( MarkList::iterator it = mMarks.begin(), itEnd = mMarks.end(); it != itEnd; ++it )
+ for( std::size_t i = 0; i < mMarks.Size(); ++i)
{
- const Property::Value& propertyValue = *it;
+ const Property::Value& propertyValue = mMarks[i];
propertyValue.Get( mark );
mark = MapValuePercentage( mark );
// Binary search
int head = 0,
- tail = mMarks.size() - 1;
+ tail = mMarks.Size() - 1;
int current;
float mark;