mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-19 04:32:19 +00:00
add operator==/!= to smallvector.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@45872 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5080f4d991
commit
8874628e30
@ -294,6 +294,16 @@ public:
|
|||||||
|
|
||||||
const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
|
const SmallVectorImpl &operator=(const SmallVectorImpl &RHS);
|
||||||
|
|
||||||
|
bool operator==(const SmallVectorImpl &RHS) const {
|
||||||
|
if (size() != RHS.size()) return false;
|
||||||
|
for (T *This = Begin, *That = RHS.Begin, *End = Begin+size();
|
||||||
|
This != End; ++This, ++That)
|
||||||
|
if (*This != *That)
|
||||||
|
return false;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
bool operator!=(const SmallVectorImpl &RHS) const { return !(*this == RHS); }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
/// isSmall - Return true if this is a smallvector which has not had dynamic
|
/// isSmall - Return true if this is a smallvector which has not had dynamic
|
||||||
/// memory allocated for it.
|
/// memory allocated for it.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user