diff options
| author | Tim Dwyer <tgdwyer@gmail.com> | 2006-02-01 04:00:20 +0000 |
|---|---|---|
| committer | tgdwyer <tgdwyer@users.sourceforge.net> | 2006-02-01 04:00:20 +0000 |
| commit | 19a594aceb275e6503ec61058256a4faf51b128d (patch) | |
| tree | fb7e1235ebf2ef3228298383d547bc5705f3a53b /src | |
| parent | add tooltips to tolerance slider (diff) | |
| download | inkscape-19a594aceb275e6503ec61058256a4faf51b128d.tar.gz inkscape-19a594aceb275e6503ec61058256a4faf51b128d.zip | |
Added consts to args of pairing heap compare fn
(bzr r64)
Diffstat (limited to 'src')
| -rw-r--r-- | src/removeoverlap/constraint.h | 2 | ||||
| -rw-r--r-- | src/removeoverlap/pairingheap/PairingHeap.cpp | 2 | ||||
| -rw-r--r-- | src/removeoverlap/pairingheap/PairingHeap.h | 6 |
3 files changed, 5 insertions, 5 deletions
diff --git a/src/removeoverlap/constraint.h b/src/removeoverlap/constraint.h index 8760dcdf6..683d66da3 100644 --- a/src/removeoverlap/constraint.h +++ b/src/removeoverlap/constraint.h @@ -33,7 +33,7 @@ public: }; #include <float.h> #include "block.h" -static inline bool compareConstraints(Constraint *&l, Constraint *&r) { +static inline bool compareConstraints(Constraint *const &l, Constraint *const &r) { double const sl = l->left->block->timeStamp > l->timeStamp ||l->left->block==l->right->block diff --git a/src/removeoverlap/pairingheap/PairingHeap.cpp b/src/removeoverlap/pairingheap/PairingHeap.cpp index 9c67f44fa..e0db8fdaf 100644 --- a/src/removeoverlap/pairingheap/PairingHeap.cpp +++ b/src/removeoverlap/pairingheap/PairingHeap.cpp @@ -28,7 +28,7 @@ using namespace std; * Construct the pairing heap. */ template <class T> -PairingHeap<T>::PairingHeap( bool (*lessThan)(T &lhs, T &rhs) ) +PairingHeap<T>::PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) ) { root = NULL; counter=0; diff --git a/src/removeoverlap/pairingheap/PairingHeap.h b/src/removeoverlap/pairingheap/PairingHeap.h index 2f68c2b6f..5f57f2f1b 100644 --- a/src/removeoverlap/pairingheap/PairingHeap.h +++ b/src/removeoverlap/pairingheap/PairingHeap.h @@ -57,14 +57,14 @@ template <class T> class Comparator { public: - virtual bool isLessThan(T &lhs, T &rhs) const = 0; + virtual bool isLessThan(T const &lhs, T const &rhs) const = 0; }; template <class T> class PairingHeap { public: - PairingHeap( bool (*lessThan)(T &lhs, T &rhs) ); + PairingHeap( bool (*lessThan)(T const &lhs, T const &rhs) ); PairingHeap( const PairingHeap & rhs ); ~PairingHeap( ); @@ -99,7 +99,7 @@ protected: } private: PairNode<T> *root; - bool (*lessThan)(T &lhs, T &rhs); + bool (*lessThan)(T const &lhs, T const &rhs); int counter; void reclaimMemory( PairNode<T> *t ) const; void compareAndLink( PairNode<T> * & first, PairNode<T> *second ) const; |
