Adding first implementation of back() reference function

This commit is contained in:
DennisOSRM 2013-01-27 14:18:54 +01:00
parent 91dc1b6639
commit 6373b3e49c

View File

@ -302,6 +302,18 @@ public:
size_t _index = index % bucketSizeC;
return (mBucketList[_bucket][_index]);
}
inline ElementT & back() {
size_t _bucket = mCurrentSize / bucketSizeC;
size_t _index = mCurrentSize % bucketSizeC;
return (mBucketList[_bucket][_index]);
}
const inline ElementT & back() const {
size_t _bucket = mCurrentSize / bucketSizeC;
size_t _index = mCurrentSize % bucketSizeC;
return (mBucketList[_bucket][_index]);
}
};
#endif /* DEALLOCATINGVECTOR_H_ */