Show
Ignore:
Timestamp:
06/16/09 12:50:21 (4 years ago)
Author:
saturday06
Message:

dioajfkld

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • lang/objective-cplusplus/i3/trunk/src/mil/include/mil/gui-cocoa/GuiModule.h

    r33968 r33996  
    1717    Tls tls; 
    1818private: 
    19     class EventBase : public boost::intrusive::slist_base_hook<>, public boost::noncopyable 
     19    class EventBase : public boost::noncopyable 
    2020    { 
    2121    public: 
    2222        void (*execute)(void* event, void* target); 
    2323        intptr_t owner_id; 
     24        EventBase* next; 
    2425    }; 
    2526 
    2627    class EventList : public boost::noncopyable 
    2728    { 
    28         boost::intrusive::slist<EventBase, boost::intrusive::constant_time_size<false>, boost::intrusive::cache_last<true> > l; 
     29        EventBase* head; 
     30        EventBase* tail; 
    2931        boost::details::pool::default_mutex m; 
    3032        typedef boost::details::pool::guard<boost::details::pool::default_mutex> guard; 
    3133    public: 
     34        EventList() 
     35        { 
     36            head = NULL; 
     37            tail = NULL; 
     38        } 
     39         
    3240        void push(EventBase& e) 
    3341        { 
    3442            guard g(m); 
    35             l.push_back(e); 
     43            e.next = NULL; 
     44            if (head == NULL) { // tail == NULL 
     45                head = &e; 
     46                tail = &e; 
     47                return; 
     48            } 
     49            tail->next = &e; 
     50            tail = &e; 
    3651        } 
    3752 
     
    3954        { 
    4055            guard g(m); 
    41             l.pop_front(); 
     56            if (!head) { 
     57                return; 
     58            } 
     59            head = head->next; 
    4260        } 
    4361 
     
    4563        { 
    4664            guard g(m); 
    47             if (l.size() == 0) 
    48             { 
    49                 return NULL; 
    50             } 
    51             return &l.front(); 
     65            return head; 
     66        } 
     67 
     68        void clear() 
     69        { 
     70            guard g(m); 
     71            head = NULL; 
     72            tail = NULL; 
    5273        } 
    5374    }; 
     75     
    5476 
    5577    template <typename T>