Show
Ignore:
Timestamp:
11/16/09 16:17:57 (4 years ago)
Author:
robert
Message:

Removed throw.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • OpenSceneGraph/trunk/src/osgUtil/TriStrip_heap_array.h

    r4772 r10757  
    33////////////////////////////////////////////////////////////////////// 
    44// 
    5 //  Copyright (C) 2002 Tanguy Fautré. 
     5//  Copyright (C) 2002 Tanguy Fautrï¿œ. 
    66// 
    77//  This software is provided 'as-is', without any express or implied 
     
    2121//  3. This notice may not be removed or altered from any source distribution. 
    2222// 
    23 //  Tanguy Fautré 
     23//  Tanguy Fautrï¿œ 
    2424//  softdev@pandora.be 
    2525// 
     
    4545#define TRISTRIP_HEAP_ARRAY_H 
    4646 
    47  
    4847// namespace common_structures 
    4948namespace common_structures { 
     
    149148inline const T & heap_array<T, CmpT>::top() const { 
    150149    // 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    } 
    153154 
    154155    return m_Heap.front().m_Elem; 
     
    160161    // Debug check to ensure element is still present 
    161162    //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    } 
    163167 
    164168    return (m_Heap[m_Finder[i]].m_Elem); 
     
    177181 
    178182    // 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    } 
    181188     
    182189    Swap(0, size() - 1); 
     
    189196inline size_t heap_array<T, CmpT>::push(const T & Elem) { 
    190197    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    } 
    192202 
    193203    size_t Id = size(); 
     
    205215 
    206216    // 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     
    209223    size_t j = m_Finder[i]; 
    210224 
     
    240254    // Debug check to ensure element is still present 
    241255    // 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    } 
    243261 
    244262    size_t j = m_Finder[i];