diff --git a/changes.txt b/changes.txt index 09ccd09b..ab0270be 100644 --- a/changes.txt +++ b/changes.txt @@ -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) diff --git a/include/irrArray.h b/include/irrArray.h index 05528035..3e008e55 100644 --- a/include/irrArray.h +++ b/include/irrArray.h @@ -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; diff --git a/include/irrList.h b/include/irrList.h index cbf3575e..27044a45 100644 --- a/include/irrList.h +++ b/include/irrList.h @@ -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: diff --git a/include/irrMap.h b/include/irrMap.h index e2fa23fd..430f0adc 100644 --- a/include/irrMap.h +++ b/include/irrMap.h @@ -664,6 +664,11 @@ class map clear(); } + // typedefs + typedef KeyType key_type; + typedef ValueType value_type; + typedef u32 size_type; + //------------------------------ // Public Commands //------------------------------