remove cstddef
This commit is contained in:
@ -1,8 +1,6 @@
|
|||||||
#ifndef __Iterator_Include_H_
|
#ifndef __Iterator_Include_H_
|
||||||
#define __Iterator_Include_H_
|
#define __Iterator_Include_H_
|
||||||
|
|
||||||
#include <cstddef>
|
|
||||||
|
|
||||||
namespace bse {
|
namespace bse {
|
||||||
|
|
||||||
// This iterator works for structures where the elements are adjacent in memory.
|
// This iterator works for structures where the elements are adjacent in memory.
|
||||||
@ -30,11 +28,11 @@ namespace bse {
|
|||||||
return *this;
|
return *this;
|
||||||
}
|
}
|
||||||
|
|
||||||
ContinuousIterator operator+(std::size_t add) {
|
ContinuousIterator operator+(unsigned int add) {
|
||||||
return ContinuousIterator(this->ptr + add);
|
return ContinuousIterator(this->ptr + add);
|
||||||
}
|
}
|
||||||
|
|
||||||
ContinuousIterator operator-(std::size_t sub) {
|
ContinuousIterator operator-(unsigned int sub) {
|
||||||
return ContinuousIterator(this->ptr - sub);
|
return ContinuousIterator(this->ptr - sub);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -52,11 +50,11 @@ namespace bse {
|
|||||||
bool operator!=(const ContinuousIterator& other) const { return this->ptr != other.ptr; }
|
bool operator!=(const ContinuousIterator& other) const { return this->ptr != other.ptr; }
|
||||||
|
|
||||||
template<typename t>
|
template<typename t>
|
||||||
friend std::size_t distance(const ContinuousIterator<t>& first, const ContinuousIterator<t>& last);
|
friend unsigned int distance(const ContinuousIterator<t>& first, const ContinuousIterator<t>& last);
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T>
|
template<typename T>
|
||||||
std::size_t distance(const ContinuousIterator<T>& first, const ContinuousIterator<T>& last) {
|
unsigned int distance(const ContinuousIterator<T>& first, const ContinuousIterator<T>& last) {
|
||||||
return last.ptr - first.ptr;
|
return last.ptr - first.ptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user