Add typedef to StringMapEntry.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@60134 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Ted Kremenek 2008-11-27 00:17:25 +00:00
parent 7e6d70a425
commit 9f1f00ab1b

View File

@ -420,16 +420,18 @@ class StringMapConstIterator {
protected:
StringMapImpl::ItemBucket *Ptr;
public:
typedef StringMapEntry<ValueTy> value_type;
explicit StringMapConstIterator(StringMapImpl::ItemBucket *Bucket,
bool NoAdvance = false)
: Ptr(Bucket) {
if (!NoAdvance) AdvancePastEmptyBuckets();
}
const StringMapEntry<ValueTy> &operator*() const {
const value_type &operator*() const {
return *static_cast<StringMapEntry<ValueTy>*>(Ptr->Item);
}
const StringMapEntry<ValueTy> *operator->() const {
const value_type *operator->() const {
return static_cast<StringMapEntry<ValueTy>*>(Ptr->Item);
}