Changeset 10757 for OpenSceneGraph/trunk/src/osgUtil/TriStrip_heap_array.h
 Timestamp:
 11/16/09 16:17:57 (6 years ago)
 Files:

 1 modified
Legend:
 Unmodified
 Added
 Removed

OpenSceneGraph/trunk/src/osgUtil/TriStrip_heap_array.h
r4772 r10757 3 3 ////////////////////////////////////////////////////////////////////// 4 4 // 5 // Copyright (C) 2002 Tanguy Fautr é.5 // Copyright (C) 2002 Tanguy Fautrï¿œ. 6 6 // 7 7 // This software is provided 'asis', without any express or implied … … 21 21 // 3. This notice may not be removed or altered from any source distribution. 22 22 // 23 // Tanguy Fautr é23 // Tanguy Fautrï¿œ 24 24 // softdev@pandora.be 25 25 // … … 45 45 #define TRISTRIP_HEAP_ARRAY_H 46 46 47 48 47 // namespace common_structures 49 48 namespace common_structures { … … 149 148 inline const T & heap_array<T, CmpT>::top() const { 150 149 // Debug check to ensure heap is not empty 151 //assert(! empty()); 152 if (empty()) throw "heap_array<T, CmpT>::top() error, heap empty"; 150 if (empty()) 151 { 152 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::top() error, heap empty."<<std::endl; 153 } 153 154 154 155 return m_Heap.front().m_Elem; … … 160 161 // Debug check to ensure element is still present 161 162 //assert(! removed(i)); 162 if (removed(i)) throw "heap_array<T, CmpT>::peek(size_t i) error"; 163 if (removed(i)) 164 { 165 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::peek(size_t i) error."<<std::endl; 166 } 163 167 164 168 return (m_Heap[m_Finder[i]].m_Elem); … … 177 181 178 182 // Debug check to ensure heap is not empty 179 //assert(! empty()); 180 if (empty()) throw "heap_array<T, CmpT>::pop() error, heap empty"; 183 if (empty()) 184 { 185 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::pop() error, heap empty."<<std::endl;; 186 return; 187 } 181 188 182 189 Swap(0, size()  1); … … 189 196 inline size_t heap_array<T, CmpT>::push(const T & Elem) { 190 197 if (m_Locked) 191 throw "heap_is_locked"; 198 { 199 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::push() heap_is_locked."<<std::endl;; 200 return 0; 201 } 192 202 193 203 size_t Id = size(); … … 205 215 206 216 // Debug check to ensure element is still present 207 if (removed(i)) throw "heap_array<T, CmpT>::erase(size_t i) error"; 208 217 if (removed(i)) 218 { 219 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::erase(size_t i) error."<<std::endl;; 220 return; 221 } 222 209 223 size_t j = m_Finder[i]; 210 224 … … 240 254 // Debug check to ensure element is still present 241 255 // assert(! removed(i)); 242 if (removed(i)) throw "heap_array<T, CmpT>::update(size_t i, const T & Elem) error"; 256 if (removed(i)) 257 { 258 osg::notify(osg::NOTICE)<<"TriStripVisitor:: heap_array<T, CmpT>::update(size_t i, const T & Elem) error."<<std::endl;; 259 return; 260 } 243 261 244 262 size_t j = m_Finder[i];