mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2024-11-22 02:33:06 +01:00
More gcc-11 fixes
This commit is contained in:
parent
4d88105d4a
commit
dba114a311
@ -720,21 +720,21 @@ namespace llvm {
|
||||
T *P;
|
||||
|
||||
public:
|
||||
SingleLinkedListIterator<T>(T *P) : P(P) {}
|
||||
SingleLinkedListIterator(T *P) : P(P) {}
|
||||
|
||||
SingleLinkedListIterator<T> &operator++() {
|
||||
SingleLinkedListIterator &operator++() {
|
||||
P = P->Next;
|
||||
return *this;
|
||||
}
|
||||
SingleLinkedListIterator<T> operator++(int) {
|
||||
SingleLinkedListIterator operator++(int) {
|
||||
SingleLinkedListIterator res = *this;
|
||||
++*this;
|
||||
return res;
|
||||
}
|
||||
bool operator!=(const SingleLinkedListIterator<T> &Other) const {
|
||||
bool operator!=(const SingleLinkedListIterator &Other) const {
|
||||
return P != Other.operator->();
|
||||
}
|
||||
bool operator==(const SingleLinkedListIterator<T> &Other) const {
|
||||
bool operator==(const SingleLinkedListIterator &Other) const {
|
||||
return P == Other.operator->();
|
||||
}
|
||||
T &operator*() const {
|
||||
|
@ -267,11 +267,11 @@ public:
|
||||
assert(Stream.getLength() % sizeof(T) == 0);
|
||||
}
|
||||
|
||||
bool operator==(const FixedStreamArray<T> &Other) const {
|
||||
bool operator==(const FixedStreamArray &Other) const {
|
||||
return Stream == Other.Stream;
|
||||
}
|
||||
|
||||
bool operator!=(const FixedStreamArray<T> &Other) const {
|
||||
bool operator!=(const FixedStreamArray &Other) const {
|
||||
return !(*this == Other);
|
||||
}
|
||||
|
||||
@ -325,10 +325,10 @@ public:
|
||||
FixedStreamArrayIterator(const FixedStreamArray<T> &Array, uint32_t Index)
|
||||
: Array(Array), Index(Index) {}
|
||||
|
||||
FixedStreamArrayIterator<T>(const FixedStreamArrayIterator<T> &Other)
|
||||
FixedStreamArrayIterator(const FixedStreamArrayIterator &Other)
|
||||
: Array(Other.Array), Index(Other.Index) {}
|
||||
FixedStreamArrayIterator<T> &
|
||||
operator=(const FixedStreamArrayIterator<T> &Other) {
|
||||
FixedStreamArrayIterator&
|
||||
operator=(const FixedStreamArrayIterator &Other) {
|
||||
Array = Other.Array;
|
||||
Index = Other.Index;
|
||||
return *this;
|
||||
@ -337,29 +337,29 @@ public:
|
||||
const T &operator*() const { return Array[Index]; }
|
||||
const T &operator*() { return Array[Index]; }
|
||||
|
||||
bool operator==(const FixedStreamArrayIterator<T> &R) const {
|
||||
bool operator==(const FixedStreamArrayIterator &R) const {
|
||||
assert(Array == R.Array);
|
||||
return (Index == R.Index) && (Array == R.Array);
|
||||
}
|
||||
|
||||
FixedStreamArrayIterator<T> &operator+=(std::ptrdiff_t N) {
|
||||
FixedStreamArrayIterator &operator+=(std::ptrdiff_t N) {
|
||||
Index += N;
|
||||
return *this;
|
||||
}
|
||||
|
||||
FixedStreamArrayIterator<T> &operator-=(std::ptrdiff_t N) {
|
||||
FixedStreamArrayIterator &operator-=(std::ptrdiff_t N) {
|
||||
assert(std::ptrdiff_t(Index) >= N);
|
||||
Index -= N;
|
||||
return *this;
|
||||
}
|
||||
|
||||
std::ptrdiff_t operator-(const FixedStreamArrayIterator<T> &R) const {
|
||||
std::ptrdiff_t operator-(const FixedStreamArrayIterator &R) const {
|
||||
assert(Array == R.Array);
|
||||
assert(Index >= R.Index);
|
||||
return Index - R.Index;
|
||||
}
|
||||
|
||||
bool operator<(const FixedStreamArrayIterator<T> &RHS) const {
|
||||
bool operator<(const FixedStreamArrayIterator &RHS) const {
|
||||
assert(Array == RHS.Array);
|
||||
return Index < RHS.Index;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user