mirror of
https://github.com/tfussell/xlnt.git
synced 2024-03-22 13:11:17 +08:00
cell iterator - add operator->
Implementation just forwards to operator*, but this is a typical operator in the iterator API and is suprising and inconvenient that it is not present
This commit is contained in:
parent
45acf665e3
commit
fcca46012e
|
@ -96,6 +96,15 @@ public:
|
|||
/// </summary>
|
||||
const reference operator*() const;
|
||||
|
||||
/// <summary>
|
||||
/// Dereferences this iterator to return the cell it points to.
|
||||
/// </summary>
|
||||
reference operator->();
|
||||
|
||||
/// <summary>
|
||||
/// Dereferences this iterator to return the cell it points to.
|
||||
/// </summary>
|
||||
const reference operator->() const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this iterator is equivalent to other.
|
||||
|
@ -222,7 +231,7 @@ public:
|
|||
/// <summary>
|
||||
/// Dereferences this iterator to return the cell it points to.
|
||||
/// </summary>
|
||||
const cell operator*() const;
|
||||
const reference operator->() const;
|
||||
|
||||
/// <summary>
|
||||
/// Returns true if this iterator is equivalent to other.
|
||||
|
|
|
@ -279,4 +279,20 @@ const const_cell_iterator::reference const_cell_iterator::operator*() const
|
|||
{
|
||||
return ws_.cell(cursor_);
|
||||
}
|
||||
|
||||
cell_iterator::reference cell_iterator::operator->()
|
||||
{
|
||||
return operator*();
|
||||
}
|
||||
|
||||
const cell_iterator::reference cell_iterator::operator->() const
|
||||
{
|
||||
return operator*();
|
||||
}
|
||||
|
||||
const const_cell_iterator::reference const_cell_iterator::operator->() const
|
||||
{
|
||||
return operator*();
|
||||
}
|
||||
|
||||
} // namespace xlnt
|
||||
|
|
Loading…
Reference in New Issue
Block a user