mirror of
https://github.com/OpenMW/openmw.git
synced 2025-04-29 13:06:52 +00:00
Remove usage of deprecated std::iterator
/home/elsid/dev/openmw/apps/openmw/mwlua/../mwbase/../mwworld/containerstore.hpp:264:23: warning: 'iterator<std::forward_iterator_tag, MWWorld::Ptr>' is deprecated [-Wdeprecated-declarations] : public std::iterator<std::forward_iterator_tag, PtrType, std::ptrdiff_t, PtrType *, PtrType&> ^ /home/elsid/dev/openmw/apps/openmw/mwlua/../mwworld/inventorystore.hpp:79:36: note: in instantiation of template class 'MWWorld::ContainerStoreIteratorBase<MWWorld::Ptr>' requested here ContainerStoreIterator mSelectedEnchantItem; ^ /usr/bin/../include/c++/v1/__iterator/iterator.h:27:29: note: 'iterator<std::forward_iterator_tag, MWWorld::Ptr>' has been explicitly marked deprecated here struct _LIBCPP_TEMPLATE_VIS _LIBCPP_DEPRECATED_IN_CXX17 iterator ^ /usr/bin/../include/c++/v1/__config:1016:39: note: expanded from macro '_LIBCPP_DEPRECATED_IN_CXX17' ^ /usr/bin/../include/c++/v1/__config:993:48: note: expanded from macro '_LIBCPP_DEPRECATED' ^
This commit is contained in:
parent
39c7325db7
commit
12df2deb70
1 changed files with 6 additions and 2 deletions
|
@ -258,10 +258,8 @@ namespace MWWorld
|
||||||
friend class MWClass::Container;
|
friend class MWClass::Container;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
template<class PtrType>
|
template<class PtrType>
|
||||||
class ContainerStoreIteratorBase
|
class ContainerStoreIteratorBase
|
||||||
: public std::iterator<std::forward_iterator_tag, PtrType, std::ptrdiff_t, PtrType *, PtrType&>
|
|
||||||
{
|
{
|
||||||
template<class From, class To, class Dummy>
|
template<class From, class To, class Dummy>
|
||||||
struct IsConvertible
|
struct IsConvertible
|
||||||
|
@ -362,6 +360,12 @@ namespace MWWorld
|
||||||
/// \return reached the end?
|
/// \return reached the end?
|
||||||
|
|
||||||
public:
|
public:
|
||||||
|
using iterator_category = std::forward_iterator_tag;
|
||||||
|
using value_type = PtrType;
|
||||||
|
using difference_type = std::ptrdiff_t;
|
||||||
|
using pointer = PtrType*;
|
||||||
|
using reference = PtrType&;
|
||||||
|
|
||||||
template<class T>
|
template<class T>
|
||||||
ContainerStoreIteratorBase (const ContainerStoreIteratorBase<T>& other)
|
ContainerStoreIteratorBase (const ContainerStoreIteratorBase<T>& other)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue