1
0
forked from 0ad/0ad

Remove the use of std::iterator in EntityMap.h

Accepted By: @vladislavbelov
Differential Revision: https://code.wildfiregames.com/D5105
This was SVN commit r27813.
This commit is contained in:
phosit 2023-08-23 12:31:07 +00:00
parent 4524188611
commit e72ad82909

View File

@ -1,4 +1,4 @@
/* Copyright (C) 2013 Wildfire Games.
/* Copyright (C) 2023 Wildfire Games.
* This file is part of 0 A.D.
*
* 0 A.D. is free software: you can redistribute it and/or modify
@ -70,8 +70,14 @@ public:
}
// Iterators
template<class U> struct _iter : public std::iterator<std::forward_iterator_tag, U>
template<class U> struct _iter
{
using iterator_category = std::forward_iterator_tag;
using value_type = U;
using difference_type = std::ptrdiff_t;
using pointer = U*;
using reference = U&;
U* val;
inline _iter(U* init) : val(init) {}
inline U& operator*() { return *val; }