Changeset 87
- Timestamp:
- 11/05/09 21:39:32 (4 years ago)
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
UI/ui.cpp
r86 r87 10 10 #include "Graphics/video.h" 11 11 #include "includes.h" 12 #include "common.h" 12 13 #include "Utilities/log.h" 13 14 … … 60 61 61 62 // 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; 68 68 69 69 Video::DisableMouse(); -
common.h
r36 r87 26 26 #define OPTION(T, path) (convertTo<T>( optionsfile->Get(path) )) 27 27 28 struct create_delete_functor 29 { 30 template <typename T> 31 void operator()(T* _p) 32 { 33 delete _p; 34 } 35 }; 36 28 37 #endif // __H_COMMON__
Note: See TracChangeset
for help on using the changeset viewer.