JNI: fix declaration of QJniArray(Mutable)Iterator postfix operators
As per the standard at [1], the second parameter has to be int, while difference_type is jint (which is also int, so no difference in practice, esp for the already released QJniArrayIterator). https://eel.is/c++draft/over.oper#over.inc-1.sentence-3 Addresses API review comment. Pick-to: 6.9 Change-Id: Idea11f83048b9b65548ec1ac8abc2586c6e61a27 Reviewed-by: Assam Boudjelthia <assam.boudjelthia@qt.io>
This commit is contained in:
parent
82f6938d8a
commit
291c5ec433
@ -86,7 +86,7 @@ public:
|
|||||||
++that.m_index;
|
++that.m_index;
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
friend QJniArrayIterator operator++(QJniArrayIterator &that, difference_type) noexcept
|
friend QJniArrayIterator operator++(QJniArrayIterator &that, int) noexcept
|
||||||
{
|
{
|
||||||
auto copy = that;
|
auto copy = that;
|
||||||
++that;
|
++that;
|
||||||
@ -110,7 +110,7 @@ public:
|
|||||||
--that.m_index;
|
--that.m_index;
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
friend QJniArrayIterator operator--(QJniArrayIterator &that, difference_type) noexcept
|
friend QJniArrayIterator operator--(QJniArrayIterator &that, int) noexcept
|
||||||
{
|
{
|
||||||
auto copy = that;
|
auto copy = that;
|
||||||
--that;
|
--that;
|
||||||
@ -228,7 +228,7 @@ public:
|
|||||||
++that.m_index;
|
++that.m_index;
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
friend QJniArrayMutableIterator operator++(QJniArrayMutableIterator &that, difference_type) noexcept
|
friend QJniArrayMutableIterator operator++(QJniArrayMutableIterator &that, int) noexcept
|
||||||
{
|
{
|
||||||
auto copy = that;
|
auto copy = that;
|
||||||
++that;
|
++that;
|
||||||
@ -252,7 +252,7 @@ public:
|
|||||||
--that.m_index;
|
--that.m_index;
|
||||||
return that;
|
return that;
|
||||||
}
|
}
|
||||||
friend QJniArrayMutableIterator operator--(QJniArrayMutableIterator &that, difference_type) noexcept
|
friend QJniArrayMutableIterator operator--(QJniArrayMutableIterator &that, int) noexcept
|
||||||
{
|
{
|
||||||
auto copy = that;
|
auto copy = that;
|
||||||
--that;
|
--that;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user