diff options
author | Jacek Antonelli | 2008-08-15 23:45:02 -0500 |
---|---|---|
committer | Jacek Antonelli | 2008-08-15 23:45:02 -0500 |
commit | d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd (patch) | |
tree | 7ed0c2c27d717801238a2e6b5749cd5bf88c3059 /linden/indra/llcommon/llskiplist.h | |
parent | Second Life viewer sources 1.17.3.0 (diff) | |
download | meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.zip meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.gz meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.bz2 meta-impy-d644fc64407dcd14ffcee6a0e9fbe28ee3a4e9bd.tar.xz |
Second Life viewer sources 1.18.0.6
Diffstat (limited to 'linden/indra/llcommon/llskiplist.h')
-rw-r--r-- | linden/indra/llcommon/llskiplist.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/linden/indra/llcommon/llskiplist.h b/linden/indra/llcommon/llskiplist.h index 40d0c8a..be3385d 100644 --- a/linden/indra/llcommon/llskiplist.h +++ b/linden/indra/llcommon/llskiplist.h | |||
@@ -28,10 +28,11 @@ | |||
28 | #ifndef LL_LLSKIPLIST_H | 28 | #ifndef LL_LLSKIPLIST_H |
29 | #define LL_LLSKIPLIST_H | 29 | #define LL_LLSKIPLIST_H |
30 | 30 | ||
31 | #include "llrand.h" | 31 | #include "llerror.h" |
32 | //#include "vmath.h" | ||
32 | 33 | ||
33 | // NOTA BENE: Insert first needs to be < NOT <= | 34 | // NOTA BENE: Insert first needs to be < NOT <= |
34 | // Binary depth must be >= 2 | 35 | |
35 | template <class DATA_TYPE, S32 BINARY_DEPTH = 10> | 36 | template <class DATA_TYPE, S32 BINARY_DEPTH = 10> |
36 | class LLSkipList | 37 | class LLSkipList |
37 | { | 38 | { |
@@ -143,11 +144,14 @@ private: | |||
143 | // Implementation | 144 | // Implementation |
144 | // | 145 | // |
145 | 146 | ||
146 | |||
147 | // Binary depth must be >= 2 | ||
148 | template <class DATA_TYPE, S32 BINARY_DEPTH> | 147 | template <class DATA_TYPE, S32 BINARY_DEPTH> |
149 | inline void LLSkipList<DATA_TYPE, BINARY_DEPTH>::init() | 148 | inline void LLSkipList<DATA_TYPE, BINARY_DEPTH>::init() |
150 | { | 149 | { |
150 | if (BINARY_DEPTH < 2) | ||
151 | { | ||
152 | llerrs << "Trying to create skip list with too little depth, " | ||
153 | "must be 2 or greater" << llendl; | ||
154 | } | ||
151 | S32 i; | 155 | S32 i; |
152 | for (i = 0; i < BINARY_DEPTH; i++) | 156 | for (i = 0; i < BINARY_DEPTH; i++) |
153 | { | 157 | { |