Another SimpleVector
removed.
This commit is contained in:
@ -28,7 +28,6 @@ namespace dw {
|
|||||||
AlignedTextblock::List::List ()
|
AlignedTextblock::List::List ()
|
||||||
{
|
{
|
||||||
textblocks = new lout::misc::SimpleVector <AlignedTextblock*> (4);
|
textblocks = new lout::misc::SimpleVector <AlignedTextblock*> (4);
|
||||||
values = new lout::misc::SimpleVector <int> (4);
|
|
||||||
maxValue = 0;
|
maxValue = 0;
|
||||||
refCount = 0;
|
refCount = 0;
|
||||||
}
|
}
|
||||||
@ -36,13 +35,12 @@ AlignedTextblock::List::List ()
|
|||||||
AlignedTextblock::List::~List ()
|
AlignedTextblock::List::~List ()
|
||||||
{
|
{
|
||||||
delete textblocks;
|
delete textblocks;
|
||||||
delete values;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
int AlignedTextblock::List::add(AlignedTextblock *textblock)
|
int AlignedTextblock::List::add(AlignedTextblock *textblock)
|
||||||
{
|
{
|
||||||
textblocks->increase ();
|
textblocks->increase ();
|
||||||
values->increase ();
|
values.push_back ( 0 );
|
||||||
textblocks->set (textblocks->size () - 1, textblock);
|
textblocks->set (textblocks->size () - 1, textblock);
|
||||||
refCount++;
|
refCount++;
|
||||||
return textblocks->size () - 1;
|
return textblocks->size () - 1;
|
||||||
|
@ -17,7 +17,7 @@ private:
|
|||||||
{
|
{
|
||||||
private:
|
private:
|
||||||
lout::misc::SimpleVector <AlignedTextblock*> *textblocks;
|
lout::misc::SimpleVector <AlignedTextblock*> *textblocks;
|
||||||
lout::misc::SimpleVector <int> *values;
|
std::vector< int > values;
|
||||||
int maxValue, refCount;
|
int maxValue, refCount;
|
||||||
|
|
||||||
~List ();
|
~List ();
|
||||||
@ -33,9 +33,8 @@ private:
|
|||||||
inline int size () { return textblocks->size (); }
|
inline int size () { return textblocks->size (); }
|
||||||
inline AlignedTextblock *getTextblock (int pos) {
|
inline AlignedTextblock *getTextblock (int pos) {
|
||||||
return textblocks->get (pos); }
|
return textblocks->get (pos); }
|
||||||
inline int getValue (int pos) {return values->get (pos); }
|
inline int getValue (int pos) {return values.at( pos ); }
|
||||||
inline void setValue (int pos, int value) {
|
inline void setValue (int pos, int value) { values.at( pos )= value; }
|
||||||
return values->set (pos, value); }
|
|
||||||
};
|
};
|
||||||
|
|
||||||
List *list;
|
List *list;
|
||||||
|
Reference in New Issue
Block a user