diff options
author | Noel Grandin <noel@peralex.com> | 2014-01-10 11:07:59 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-01-20 13:14:41 +0200 |
commit | 1f3eed97de1c3dcbf532cd63023239a4543ae1dc (patch) | |
tree | d80a2d1296e091ba44613a56ad9536a507908a60 /scaddins/source/analysis/analysishelper.hxx | |
parent | 20c4de49ac040e4c232d59f1ce0c86660b0ebc09 (diff) |
convert custom list implementation ScaDoubleList to std::vector
Change-Id: I98865a54f675ebdb7724327305f9f9a5eeccfeb4
Diffstat (limited to 'scaddins/source/analysis/analysishelper.hxx')
-rw-r--r-- | scaddins/source/analysis/analysishelper.hxx | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/scaddins/source/analysis/analysishelper.hxx b/scaddins/source/analysis/analysishelper.hxx index d250f736c3a9..f2c74a3ba385 100644 --- a/scaddins/source/analysis/analysishelper.hxx +++ b/scaddins/source/analysis/analysishelper.hxx @@ -331,12 +331,13 @@ public: //----------------------------------------------------------------------------- -class ScaDoubleList : protected MyList +class ScaDoubleList { +private: + std::vector<double> maVector; protected: - inline void ListAppend( double fValue ) { MyList::Append( new double( fValue ) ); } + inline void ListAppend( double fValue ) { maVector.push_back(fValue); } - using MyList::Append; inline void Append( double fValue ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ) { if( CheckInsert( fValue ) ) ListAppend( fValue ); } @@ -362,14 +363,12 @@ protected: sal_Bool bIgnoreEmpty ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); public: - virtual ~ScaDoubleList(); - - using MyList::Count; - inline const double* Get( sal_uInt32 nIndex ) const - { return static_cast< const double* >( MyList::GetObject( nIndex ) ); } + virtual ~ScaDoubleList() {} - inline const double* First() { return static_cast< const double* >( MyList::First() ); } - inline const double* Next() { return static_cast< const double* >( MyList::Next() ); } + inline sal_uInt32 Count() const + { return maVector.size(); } + inline double Get( sal_uInt32 n ) const + { return maVector[n]; } void Append( const css::uno::Sequence< css::uno::Sequence< double > >& rValueArr ) throw( css::uno::RuntimeException, css::lang::IllegalArgumentException ); |