summaryrefslogtreecommitdiff
authormickeyl <mickeyl>2004-04-24 15:27:06 (UTC)
committer mickeyl <mickeyl>2004-04-24 15:27:06 (UTC)
commit186c4d03ea8bf3aee4c535453409f1234442bff3 (patch) (side-by-side diff)
treedd01280746c114656496ca12553e73a35e2dbfbb
parentc9f1383f79380e7f50f257670a11f9b10024e958 (diff)
downloadopie-186c4d03ea8bf3aee4c535453409f1234442bff3.zip
opie-186c4d03ea8bf3aee4c535453409f1234442bff3.tar.gz
opie-186c4d03ea8bf3aee4c535453409f1234442bff3.tar.bz2
gcc 3.4 fixlet
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--noncore/apps/tinykate/libkate/document/katetextline.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/noncore/apps/tinykate/libkate/document/katetextline.h b/noncore/apps/tinykate/libkate/document/katetextline.h
index c2968cc..3518900 100644
--- a/noncore/apps/tinykate/libkate/document/katetextline.h
+++ b/noncore/apps/tinykate/libkate/document/katetextline.h
@@ -48,68 +48,68 @@ public:
};
template<class T>
class FastValueList : public QValueList<T>
{
public:
typedef QValueListIterator<T> Iterator;
typedef QValueListConstIterator<T> ConstIterator;
protected:
FVPrivate<T> *fvp;
Iterator fastat( uint i ) {
- uint num=count();
- if (i>=num) {return end();}
- if (fvp->curpos<0) { fvp->curpos=0; fvp->curit=begin(); }
+ uint num=this->count();
+ if (i>=num) {return this->end();}
+ if (fvp->curpos<0) { fvp->curpos=0; fvp->curit=this->begin(); }
uint curpos=(uint) fvp->curpos;
Iterator curit(fvp->curit.node);
if (curpos==i) return curit;
int diff=i-curpos;
bool forward;
if (diff<0) diff=-diff;
if (((uint)diff < i) && ((uint)diff < num-i)) { // start from current node
forward=i > (uint)curpos;
} else if (i < num - i) { // start from first node
- curit=begin(); diff=i; forward=TRUE;
+ curit=this->begin(); diff=i; forward=TRUE;
} else { // start from last node
- curit=fromLast(); diff=num - i - 1;
+ curit=this->fromLast(); diff=num - i - 1;
if (diff<0) diff=0;
forward=FALSE;
}
if (forward) {
while(diff--) curit++;
} else {
while(diff--) curit--;
}
fvp->curpos=i; fvp->curit=curit;
return curit;
}
ConstIterator fastat( uint i ) const {
- uint num=count();
- if (i>=num) {return end();}
- if (fvp->curpos<0) { fvp->curpos=0; fvp->curit=begin(); }
+ uint num=this->count();
+ if (i>=num) {return this->end();}
+ if (fvp->curpos<0) { fvp->curpos=0; fvp->curit=this->begin(); }
uint curpos=(uint) fvp->curpos;
ConstIterator curit=fvp->curit;
if (curpos==i) return curit;
int diff=i-curpos;
bool forward;
if (diff<0) diff=-diff;
if (((uint)diff < i) && ((uint)diff < num-i)) { // start from current node
forward=i > (uint)curpos;
} else if (i < num - i) { // start from first node
- curit=begin(); diff=i; forward=TRUE;
+ curit=this->begin(); diff=i; forward=TRUE;
} else { // start from last node
- curit=fromLast(); diff=num - i - 1;
+ curit=this->fromLast(); diff=num - i - 1;
if (diff<0) diff=0;
forward=FALSE;
}
if (forward) {
while(diff--) curit++;
} else {
while(diff--) curit--;
}
fvp->curpos=i; fvp->curit=curit;
return curit;
}
@@ -129,27 +129,27 @@ public:
}
Iterator prepend( const T& x ) {
fvp->curpos=-1; return QValueList<T>::prepend( x );
}
Iterator remove( Iterator it ) {
fvp->curpos=-1; return QValueList<T>::remove( it );
}
void remove( const T& x ) {
fvp->curpos=-1; QValueList<T>::remove( x );
}
- T& operator[] ( uint i ) { detach(); return fastat(i); }
+ T& operator[] ( uint i ) { this->detach(); return fastat(i); }
const T& operator[] ( uint i ) const { return *fastat(i); }
- Iterator at( uint i ) { detach(); return fastat(i); }
+ Iterator at( uint i ) { this->detach(); return fastat(i); }
ConstIterator at( uint i ) const { return ConstIterator( fastat(i) ); }
};
/**
The TextLine represents a line of text. A text line that contains the
text, an attribute for each character, an attribute for the free space
behind the last character and a context number for the syntax highlight.
The attribute stores the index to a table that contains fonts and colors
and also if a character is selected.
*/
class TextLine : public KShared