mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
range_iterator - operator* const overloads
Users may still want to dereference a const iterator (note: not a const_iterator). Also use the "reference" typedef to ensure there is only 1 source of information
This commit is contained in:
parent
89e44f20c8
commit
2169d24714
|
@ -86,7 +86,12 @@ public:
|
|||
/// <summary>
|
||||
/// Dereference the iterator to return a column or row.
|
||||
/// </summary>
|
||||
cell_vector operator*() const;
|
||||
reference operator*();
|
||||
|
||||
/// <summary>
|
||||
/// Dereference the iterator to return a column or row.
|
||||
/// </summary>
|
||||
const reference operator*() const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this iterator is equivalent to other.
|
||||
|
@ -196,7 +201,7 @@ public:
|
|||
/// <summary>
|
||||
/// Dereferennce the iterator to return the current column/row.
|
||||
/// </summary>
|
||||
const cell_vector operator*() const;
|
||||
const reference operator*() const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this iterator is equivalent to other.
|
||||
|
|
|
@ -28,7 +28,12 @@
|
|||
|
||||
namespace xlnt {
|
||||
|
||||
cell_vector range_iterator::operator*() const
|
||||
range_iterator::reference range_iterator::operator*()
|
||||
{
|
||||
return cell_vector(ws_, cursor_, bounds_, order_, skip_null_, false);
|
||||
}
|
||||
|
||||
const range_iterator::reference range_iterator::operator*() const
|
||||
{
|
||||
return cell_vector(ws_, cursor_, bounds_, order_, skip_null_, false);
|
||||
}
|
||||
|
@ -264,7 +269,7 @@ const_range_iterator const_range_iterator::operator++(int)
|
|||
return old;
|
||||
}
|
||||
|
||||
const cell_vector const_range_iterator::operator*() const
|
||||
const const_range_iterator::reference const_range_iterator::operator*() const
|
||||
{
|
||||
return cell_vector(ws_, cursor_, bounds_, order_, skip_null_, false);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user