Skip to content

Commit 2157055

Browse files
[ADT] Simplify EnumeratedArray::operator[] (NFC) (#156811)
This patch simplifies EnumeratedArray::operator[] with the injected-class-name.
1 parent ec061cd commit 2157055

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

llvm/include/llvm/ADT/EnumeratedArray.h

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -57,8 +57,7 @@ class EnumeratedArray {
5757
}
5858
ValueType &operator[](Enumeration Index) {
5959
return const_cast<ValueType &>(
60-
static_cast<const EnumeratedArray<ValueType, Enumeration, LargestEnum,
61-
IndexType, Size> &>(*this)[Index]);
60+
static_cast<const EnumeratedArray &>(*this)[Index]);
6261
}
6362
IndexType size() const { return Size; }
6463
bool empty() const { return size() == 0; }

0 commit comments

Comments
 (0)