Answer the question
In order to leave comments, you need to log in
How to understand such a construction?
Everything is in code.
UWORD32 BitString::getValue (unsigned long s, unsigned short l) const
{
myassert (l <= 32) ;
UWORD32 retval = 0 ;
for (unsigned short i = 0 ; i < l ; i++) {
retval |= (*this)[s + i] << i ; // Как истолковать конструкцию (*this)[s + i] ?
}
return retval ;
}
/**
* get the value of the i-th bit
**/
BIT operator[] (const unsigned long i) const ;
Answer the question
In order to leave comments, you need to log in
The BitString class is apparently derived from some class with the [] operator (or contains such an operator itself).
This thing is a command - "take yourself and call the operator []" on yourself.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question