aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/llcommon/llskiplist.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--linden/indra/llcommon/llskiplist.h12
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
35template <class DATA_TYPE, S32 BINARY_DEPTH = 10> 36template <class DATA_TYPE, S32 BINARY_DEPTH = 10>
36class LLSkipList 37class LLSkipList
37{ 38{
@@ -143,11 +144,14 @@ private:
143// Implementation 144// Implementation
144// 145//
145 146
146
147// Binary depth must be >= 2
148template <class DATA_TYPE, S32 BINARY_DEPTH> 147template <class DATA_TYPE, S32 BINARY_DEPTH>
149inline void LLSkipList<DATA_TYPE, BINARY_DEPTH>::init() 148inline 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 {