Changeset 87


Ignore:
Timestamp:
11/05/09 21:39:32 (4 years ago)
Author:
knowknowledge
Message:

Merge branch 'master' of git://github.com/arke/Epiar

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • UI/ui.cpp

    r86 r87  
    1010#include "Graphics/video.h" 
    1111#include "includes.h" 
     12#include "common.h" 
    1213#include "Utilities/log.h" 
    1314 
     
    6061         
    6162        // Free all widgets 
    62         child = children.front();        
    63         while( child != NULL ){ 
    64                 children.pop_front(); 
    65                 delete child; 
    66                 child=children.front();  
    67         } 
     63        std::for_each(children.begin(), children.end(), create_delete_functor()); 
     64        children.clear(); 
     65 
     66        mouseFocus = NULL; 
     67        keyboardFocus = NULL; 
    6868         
    6969        Video::DisableMouse(); 
  • common.h

    r36 r87  
    2626#define OPTION(T, path) (convertTo<T>( optionsfile->Get(path) )) 
    2727 
     28struct create_delete_functor 
     29{ 
     30        template <typename T> 
     31        void operator()(T* _p) 
     32        { 
     33                delete _p; 
     34        } 
     35}; 
     36 
    2837#endif // __H_COMMON__ 
Note: See TracChangeset for help on using the changeset viewer.