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:
+2
-25
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user