make wxStringOperationsWchar methods templates too to be able to reuse them with char pointers (and for consistency with wxStringOperationsUtf8)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@59795 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -28,25 +28,21 @@
|
|||||||
struct WXDLLIMPEXP_BASE wxStringOperationsWchar
|
struct WXDLLIMPEXP_BASE wxStringOperationsWchar
|
||||||
{
|
{
|
||||||
// moves the iterator to the next Unicode character
|
// moves the iterator to the next Unicode character
|
||||||
static void IncIter(wxStringImpl::iterator& i) { ++i; }
|
template <typename Iterator>
|
||||||
static void IncIter(wxStringImpl::const_iterator& i) { ++i; }
|
static void IncIter(Iterator& i) { ++i; }
|
||||||
|
|
||||||
// moves the iterator to the previous Unicode character
|
// moves the iterator to the previous Unicode character
|
||||||
static void DecIter(wxStringImpl::iterator& i) { --i; }
|
template <typename Iterator>
|
||||||
static void DecIter(wxStringImpl::const_iterator& i) { --i; }
|
static void DecIter(Iterator& i) { --i; }
|
||||||
|
|
||||||
// moves the iterator by n Unicode characters
|
// moves the iterator by n Unicode characters
|
||||||
static wxStringImpl::iterator AddToIter(const wxStringImpl::iterator& i, ptrdiff_t n)
|
template <typename Iterator>
|
||||||
{ return i + n; }
|
static Iterator AddToIter(const Iterator& i, ptrdiff_t n)
|
||||||
static wxStringImpl::const_iterator AddToIter(const wxStringImpl::const_iterator& i, ptrdiff_t n)
|
|
||||||
{ return i + n; }
|
{ return i + n; }
|
||||||
|
|
||||||
// returns distance of the two iterators in Unicode characters
|
// returns distance of the two iterators in Unicode characters
|
||||||
static ptrdiff_t DiffIters(const wxStringImpl::iterator& i1,
|
template <typename Iterator>
|
||||||
const wxStringImpl::iterator& i2)
|
static ptrdiff_t DiffIters(const Iterator& i1, const Iterator& i2)
|
||||||
{ return i1 - i2; }
|
|
||||||
static ptrdiff_t DiffIters(const wxStringImpl::const_iterator& i1,
|
|
||||||
const wxStringImpl::const_iterator& i2)
|
|
||||||
{ return i1 - i2; }
|
{ return i1 - i2; }
|
||||||
|
|
||||||
// encodes the character to a form used to represent it in internal
|
// encodes the character to a form used to represent it in internal
|
||||||
|
Reference in New Issue
Block a user