diff options
author | Sascha Ballach <sab@openoffice.org> | 2000-12-18 13:14:24 +0000 |
---|---|---|
committer | Sascha Ballach <sab@openoffice.org> | 2000-12-18 13:14:24 +0000 |
commit | be10c3ab725b749192c372b7909513efa85a3fdc (patch) | |
tree | 60143617459e922aaa53d5eb4156b7ad25553856 /sc/source/filter/xml/XMLDetectiveContext.cxx | |
parent | cd152b2340c67d0e8a28be4b5d964621f88b312c (diff) |
change from a vector to in this special cases faster list
Diffstat (limited to 'sc/source/filter/xml/XMLDetectiveContext.cxx')
-rw-r--r-- | sc/source/filter/xml/XMLDetectiveContext.cxx | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/sc/source/filter/xml/XMLDetectiveContext.cxx b/sc/source/filter/xml/XMLDetectiveContext.cxx index 5a88363b8b2f..0445afca77e1 100644 --- a/sc/source/filter/xml/XMLDetectiveContext.cxx +++ b/sc/source/filter/xml/XMLDetectiveContext.cxx @@ -2,9 +2,9 @@ * * $RCSfile: XMLDetectiveContext.cxx,v $ * - * $Revision: 1.4 $ + * $Revision: 1.5 $ * - * last change: $Author: hr $ $Date: 2000-11-15 12:26:19 $ + * last change: $Author: sab $ $Date: 2000-12-18 14:14:24 $ * * The Contents of this file are made available subject to the terms of * either of the following licenses @@ -106,26 +106,25 @@ ScMyImpDetectiveObj::ScMyImpDetectiveObj() : { } - //___________________________________________________________________ -sal_Bool LessDetectiveOp(const ScMyImpDetectiveOp& rDetOp1, const ScMyImpDetectiveOp& rDetOp2) +sal_Bool ScMyImpDetectiveOp::operator<(const ScMyImpDetectiveOp& rDetOp) { - return (rDetOp1.nIndex < rDetOp2.nIndex); + return (nIndex < rDetOp.nIndex); } void ScMyImpDetectiveOpArray::Sort() { - ::std::sort( aDetectiveOpVec.begin(), aDetectiveOpVec.end(), LessDetectiveOp ); + aDetectiveOpList.sort(); } sal_Bool ScMyImpDetectiveOpArray::GetFirstOp( ScMyImpDetectiveOp& rDetOp ) { - if( !aDetectiveOpVec.size() ) + if( aDetectiveOpList.empty() ) return sal_False; - ScMyImpDetectiveOpVec::iterator aItr = aDetectiveOpVec.begin(); + ScMyImpDetectiveOpList::iterator aItr = aDetectiveOpList.begin(); rDetOp = *aItr; - aDetectiveOpVec.erase( aItr ); + aDetectiveOpList.erase( aItr ); return sal_True; } |