Add typedefs like value_type and size_type to array, list and map like std containers have.

Thanks @SLC for idea (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52363)


git-svn-id: svn://svn.code.sf.net/p/irrlicht/code/trunk@5639 dfc29bdd-3216-0410-991c-e03cc46cb475
master
cutealien 2018-08-23 09:52:13 +00:00
parent 27915916df
commit b44b6891a6
4 changed files with 11 additions and 0 deletions

View File

@ -1,5 +1,6 @@
--------------------------
Changes in 1.9 (not yet released)
- Add typedefs like value_type and size_type to array, list and map like std containers have. Thanks @SLC for idea (http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52363)
- Remove unused enum E_LOST_RESOURCE
- CGUIComboBox uses now EGDS_SCROLLBAR_SIZE instead of EGDS_WINDOW_BUTTON_WIDTH for the width of the listbox button to allow changing that without changing window topbar height.
Thanks @LunaRebirth for reporting. (Forum: http://irrlicht.sourceforge.net/forum/viewtopic.php?f=1&t=52297&p=303682#p303682)

View File

@ -604,6 +604,9 @@ public:
other.is_sorted = helper_is_sorted;
}
typedef TAlloc allocator_type;
typedef T value_type;
typedef u32 size_type;
private:
T* data;

View File

@ -394,6 +394,8 @@ public:
core::swap(allocator, other.allocator); // memory is still released by the same allocator used for allocation
}
typedef T value_type;
typedef u32 size_type;
private:

View File

@ -664,6 +664,11 @@ class map
clear();
}
// typedefs
typedef KeyType key_type;
typedef ValueType value_type;
typedef u32 size_type;
//------------------------------
// Public Commands
//------------------------------