the const CT& stuff confuses GCC; the doublecasting should be optimized out by the compiler so we don't need three different sizes of the same thing.

This commit is contained in:
Ben "root" Anderson
2013-10-25 02:20:17 -05:00
parent cdb551b115
commit 082a9723af
+2 -25
View File
@@ -742,35 +742,12 @@ public:
// Array-indexing operators. Required because we defined an implicit cast
// to operator const CT* (Thanks to Julian Selman for pointing this out)
CT& operator[](int nIdx)
CT& operator[](long long int nIdx)
{
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
const CT& operator[](int nIdx) const
{
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
CT& operator[](unsigned int nIdx)
{
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
const CT& operator[](unsigned int nIdx) const
{
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
CT& operator[](long unsigned int nIdx){
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
const CT& operator[](long unsigned int nIdx) const {
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
const CT& operator[](long long unsigned int nIdx) const {
CT& operator[](long long unsigned int nIdx){
return MYBASE::operator[](static_cast<MYSIZE>(nIdx));
}
#ifndef SS_NO_IMPLICIT_CASTS