From f4663381f8953f93f359ddfd3d1823653c0f517f Mon Sep 17 00:00:00 2001 From: Luke Street Date: Tue, 15 Sep 2026 05:21:20 -0600 Subject: [PATCH 1/2] Match & link PAL CTransitionDatabaseGame --- config/GM8P01_00/splits.txt | 7 ++-- config/GM8P01_00/symbols.txt | 36 ++++++++++---------- configure.py | 2 +- include/rstl/algorithm.hpp | 3 +- include/rstl/vector.hpp | 8 ++++- src/MetroidPrime/CTransitionDatabaseGame.cpp | 3 +- 6 files changed, 32 insertions(+), 27 deletions(-) diff --git a/config/GM8P01_00/splits.txt b/config/GM8P01_00/splits.txt index 294437f3e..19ec63dc5 100644 --- a/config/GM8P01_00/splits.txt +++ b/config/GM8P01_00/splits.txt @@ -276,9 +276,9 @@ MetroidPrime/CAnimationDatabaseGame.cpp: .data start:0x803C5678 end:0x803C5698 MetroidPrime/CTransitionDatabaseGame.cpp: - .text start:0x8006ECAC end:0x8007033C + .text start:0x8006EA38 end:0x8007033C .data start:0x803C5698 end:0x803C56A8 - .sbss start:0x8046AF08 end:0x8046AF10 + .sbss start:0x8046AF08 end:0x8046AF18 MetroidPrime/Tweaks/CTweakPlayerControl.cpp: .text start:0x8007033C end:0x8007060C @@ -2208,7 +2208,8 @@ Kyoto/Animation/CAnimTreeSequence.cpp: .rodata start:0x803C2230 end:0x803C2238 Kyoto/Animation/CCharacterInfo.cpp: - .text start:0x802C8350 end:0x802C9E94 + .text start:0x802C8350 end:0x802CA08C + .sdata start:0x8046A7E0 end:0x8046A7E8 .sbss start:0x8046B398 end:0x8046B3D8 Kyoto/Animation/CCharacterSet.cpp: diff --git a/config/GM8P01_00/symbols.txt b/config/GM8P01_00/symbols.txt index d9d326b30..59d75f5d7 100644 --- a/config/GM8P01_00/symbols.txt +++ b/config/GM8P01_00/symbols.txt @@ -941,7 +941,7 @@ __ct__Q24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator>FRC __dt__Q24rstl62vector<25TToken<15CCharLayoutInfo>,Q24rstl17rmemory_allocator>Fv = .text:0x8003382C; // type:function size:0xB0 GetCharacterInfoDB__17CCharacterFactoryFRC17CAnimCharacterSet = .text:0x800338DC; // type:function size:0x98 __ct__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>FRCQ24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator> = .text:0x80033974; // type:function size:0x8C -fn_80033A00 = .text:0x80033A00; // type:function size:0x74 +uninitialized_copy_n__4rstlFP14CCharacterInfoiP14CCharacterInfo = .text:0x80033A00; // type:function size:0x74 scope:local construct<14CCharacterInfo>__4rstlFPvRC14CCharacterInfo = .text:0x80033A74; // type:function size:0x28 push_back__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>FRC14CCharacterInfo = .text:0x80033A9C; // type:function size:0x7C __dt__Q24rstl51vector<14CCharacterInfo,Q24rstl17rmemory_allocator>Fv = .text:0x80033B18; // type:function size:0x8C @@ -951,15 +951,15 @@ GetCharInfo__17CCharacterFactoryCFi = .text:0x80033C18; // type:function size:0x CreateCharacter__17CCharacterFactoryCFibRC33TLockedToken<17CCharacterFactory>i = .text:0x80033C28; // type:function size:0x344 __dt__10IVParamObjFv = .text:0x80033F6C; // type:function size:0x5C __ct__17CCharacterFactoryFR11CSimplePoolRC17CAnimCharacterSetUi = .text:0x80033FC8; // type:function size:0x610 -fn_800345D8 = .text:0x800345D8; // type:function size:0x20 +NonConstCopy__32TToken<22CAnimationDatabaseGame>CFv = .text:0x800345D8; // type:function size:0x20 scope:weak __dt__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>Fv = .text:0x800345F8; // type:function size:0xB4 __ct__33TToken<23CTransitionDatabaseGame>FP23CTransitionDatabaseGame = .text:0x800346AC; // type:function size:0x74 __dt__51TObjOwnerDerivedFromIObj<23CTransitionDatabaseGame>Fv = .text:0x80034720; // type:function size:0x90 __dt__23CTransitionDatabaseGameFv = .text:0x800347B0; // type:function size:0xB8 -fn_80034868 = .text:0x80034868; // type:function size:0x8C -fn_800348F4 = .text:0x800348F4; // type:function size:0x60 -fn_80034954 = .text:0x80034954; // type:function size:0x8C -fn_800349E0 = .text:0x800349E0; // type:function size:0x60 +__dt__Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>Fv = .text:0x80034868; // type:function size:0x8C scope:weak +destroy,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x800348F4; // type:function size:0x60 scope:local +__dt__Q24rstl82vector>,Q24rstl17rmemory_allocator>Fv = .text:0x80034954; // type:function size:0x8C scope:weak +destroy>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>>__4rstlFQ24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl184pointer_iterator>,Q24rstl82vector>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator> = .text:0x800349E0; // type:function size:0x60 scope:local GetNewDerivedObject__51TObjOwnerDerivedFromIObj<23CTransitionDatabaseGame>FP23CTransitionDatabaseGame = .text:0x80034A40; // type:function size:0x90 __ct__32TToken<22CAnimationDatabaseGame>FP22CAnimationDatabaseGame = .text:0x80034AD0; // type:function size:0x74 __dt__50TObjOwnerDerivedFromIObj<22CAnimationDatabaseGame>Fv = .text:0x80034B44; // type:function size:0x90 @@ -1949,9 +1949,9 @@ distance,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iterator>__4rstlFQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iteratorQ34rstl130red_black_tree<10CPrimitive,10CPrimitive,0,Q24rstl22identity<10CPrimitive>,Q24rstl18less<10CPrimitive>,Q24rstl17rmemory_allocator>8iteratorQ24rstl20forward_iterator_tag = .text:0x8006E7DC; // type:function size:0x88 reserve__Q24rstl47vector<10CPrimitive,Q24rstl17rmemory_allocator>Fi = .text:0x8006E864; // type:function size:0xF0 reserve__Q24rstl62vector,Q24rstl17rmemory_allocator>Fi = .text:0x8006E954; // type:function size:0xE4 -fn_8006EA38 = .text:0x8006EA38; // type:function size:0xB8 -fn_8006EAF0 = .text:0x8006EAF0; // type:function size:0xC0 -fn_8006EBB0 = .text:0x8006EBB0; // type:function size:0xFC +GetMetaTrans__23CTransitionDatabaseGameCFUiUi = .text:0x8006EA38; // type:function size:0xB8 scope:global +find_by_key>,Q24rstl17rmemory_allocator>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>__4rstlFRCQ24rstl82vector>,Q24rstl17rmemory_allocator>RCUiRCQ237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer = .text:0x8006EAF0; // type:function size:0xC0 scope:local +find_by_key,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>__4rstlFRCQ24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>RCQ24rstl11pairRCQ237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer = .text:0x8006EBB0; // type:function size:0xFC scope:local __ct__23CTransitionDatabaseGameFRCQ24rstl48vector<11CTransition,Q24rstl17rmemory_allocator>RCQ24rstl52vector<15CHalfTransition,Q24rstl17rmemory_allocator>Q24rstl20rc_ptr<10IMetaTrans> = .text:0x8006ECAC; // type:function size:0x280 push_back__Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>FRCQ24rstl56pair,Q24rstl20rc_ptr<10IMetaTrans>> = .text:0x8006EF2C; // type:function size:0xA0 sort,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer>>__4rstlFQ24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl221pointer_iterator,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl100vector,Q24rstl20rc_ptr<10IMetaTrans>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl142pair_sorter_finder,Q24rstl20rc_ptr<10IMetaTrans>>,Q237@unnamed@CTransitionDatabaseGame_cpp@13uint_comparer> = .text:0x8006EFCC; // type:function size:0x254 @@ -10371,7 +10371,7 @@ cinput_stream_helper,Q24rstl17rmemory_allocator>,6CAABox>FR12CInputStream = .text:0x802C8F88; // type:function size:0x9C Get<12CPASDatabase>__12CInputStreamFRC21TType<12CPASDatabase> = .text:0x802C9024; // type:function size:0x3C cinput_stream_helper<12CPASDatabase>__FRC21TType<12CPASDatabase>R12CInputStream = .text:0x802C9060; // type:function size:0x24 -_ct__Q24rstl220vector,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>,Q24rstl17rmemory_allocator>FR12CInputStreamRCQ24rstl17rmemory_allocator = .text:0x802C9084; // type:function size:0x124 +__ct__Q24rstl220vector,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>,Q24rstl17rmemory_allocator>FR12CInputStreamRCQ24rstl17rmemory_allocator = .text:0x802C9084; // type:function size:0x124 Get,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>>__12CInputStreamFRC192TType,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>> = .text:0x802C91A8; // type:function size:0x3C cinput_stream_helper,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>>__FRC192TType,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>>R12CInputStream = .text:0x802C91E4; // type:function size:0x24 __ct__Q24rstl175pair,Q24rstl17rmemory_allocator>,Q24rstl66basic_string,Q24rstl17rmemory_allocator>>>FR12CInputStream = .text:0x802C9208; // type:function size:0x9C @@ -10397,7 +10397,7 @@ reserve__Q24rstl189vector,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>>__4rstlFPQ24rstl144pair,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>PQ24rstl144pair,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>> = .text:0x802C9D78; // type:function size:0x4C scope:local uninitialized_copy,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl189vector,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>,PQ24rstl144pair,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>>__4rstlFQ24rstl399pointer_iterator,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl189vector,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>Q24rstl399pointer_iterator,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl189vector,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>>,Q24rstl17rmemory_allocator>,Q24rstl17rmemory_allocator>PQ24rstl144pair,Q24rstl17rmemory_allocator>,Q24rstl53vector<16CEffectComponent,Q24rstl17rmemory_allocator>> = .text:0x802C9DC4; // type:function size:0x68 scope:local free_node_and_sub_nodes__Q24rstl89red_black_tree,Q24rstl8less,Q24rstl17rmemory_allocator>FPQ34rstl89red_black_tree,Q24rstl8less,Q24rstl17rmemory_allocator>4node = .text:0x802C9E2C; // type:function size:0x68 -fn_802C9E94 = .text:0x802C9E94; // type:function size:0x1F8 +insert_into__Q24rstl89red_black_tree,Q24rstl8less,Q24rstl17rmemory_allocator>FPQ34rstl89red_black_tree,Q24rstl8less,Q24rstl17rmemory_allocator>4nodeRCUi = .text:0x802C9E94; // type:function size:0x1F8 scope:weak __ct__13CCharacterSetFR12CInputStream = .text:0x802CA08C; // type:function size:0xB4 push_back__Q24rstl68vector,Q24rstl17rmemory_allocator>FRCQ24rstl24pair = .text:0x802CA140; // type:function size:0x7C construct>__4rstlFPvRCQ24rstl24pair = .text:0x802CA1BC; // type:function size:0x28 @@ -19130,9 +19130,9 @@ lbl_8046A7CC = .sdata:0x8046A7CC; // type:object size:0x4 data:4byte sTableIndex__17CCollidableSphere = .sdata:0x8046A7D0; // type:object size:0x8 data:4byte lbl_8046A7D8 = .sdata:0x8046A7D8; // type:object size:0x4 data:4byte lbl_8046A7DC = .sdata:0x8046A7DC; // type:object size:0x4 align:4 data:float -lbl_8046A7E0 = .sdata:0x8046A7E0; // type:object size:0x1 data:byte -lbl_8046A7E1 = .sdata:0x8046A7E1; // type:object size:0x1 data:byte -lbl_8046A7E2 = .sdata:0x8046A7E2; // type:object size:0x6 data:byte +@2072 = .sdata:0x8046A7E0; // type:object size:0x1 scope:local data:byte +@2080 = .sdata:0x8046A7E1; // type:object size:0x1 scope:local data:byte +@2095 = .sdata:0x8046A7E2; // type:object size:0x1 scope:local data:byte @21 = .sdata:0x8046A7E8; // type:object size:0x4 scope:local data:4byte @22 = .sdata:0x8046A7EC; // type:object size:0x4 scope:local align:4 data:float @23 = .sdata:0x8046A7F0; // type:object size:0x4 scope:local data:4byte @@ -19548,10 +19548,10 @@ skGlobalNonConstEnd__6CWorld = .sbss:0x8046AEF4; // type:object size:0x4 scope:g lbl_8046AEF8 = .sbss:0x8046AEF8; // type:object size:0x1 data:byte lbl_8046AEFC = .sbss:0x8046AEFC; // type:object size:0x1 data:byte spSamusHud = .sbss:0x8046AF00; // type:object size:0x8 scope:local data:4byte -lbl_8046AF08 = .sbss:0x8046AF08; // type:object size:0x1 data:byte -lbl_8046AF0C = .sbss:0x8046AF0C; // type:object size:0x1 data:byte -lbl_8046AF10 = .sbss:0x8046AF10; // type:object size:0x1 data:byte -lbl_8046AF14 = .sbss:0x8046AF14; // type:object size:0x1 data:byte +@211 = .sbss:0x8046AF08; // type:object size:0x1 scope:local data:byte +@219 = .sbss:0x8046AF0C; // type:object size:0x1 scope:local data:byte +@281 = .sbss:0x8046AF10; // type:object size:0x1 scope:local data:byte +@287 = .sbss:0x8046AF14; // type:object size:0x1 scope:local data:byte init$714 = .sbss:0x8046AF18; // type:object size:0x1 data:byte sktonOHurtWeaponMode$713 = .sbss:0x8046AF1C; // type:object size:0xC data:4byte skDamageColor__10CPatterned = .sbss:0x8046AF28; // type:object size:0x4 data:4byte diff --git a/configure.py b/configure.py index 9dc7b5a1b..8183676f3 100755 --- a/configure.py +++ b/configure.py @@ -596,7 +596,7 @@ def EquivalentFor(*versions): Object(NonMatching, "MetroidPrime/CGameArea.cpp"), Object(NonMatching, "MetroidPrime/HUD/CSamusHud.cpp"), Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CAnimationDatabaseGame.cpp"), - Object(NonMatching, "MetroidPrime/CTransitionDatabaseGame.cpp"), + Object(MatchingFor("GM8P01_00"), "MetroidPrime/CTransitionDatabaseGame.cpp"), Object( MatchingFor("GM8E01_00", "GM8E01_01", "GM8P01_00"), "MetroidPrime/Tweaks/CTweakPlayerControl.cpp", diff --git a/include/rstl/algorithm.hpp b/include/rstl/algorithm.hpp index 1d72b280e..52d08a0dd 100644 --- a/include/rstl/algorithm.hpp +++ b/include/rstl/algorithm.hpp @@ -278,8 +278,7 @@ typename Vec::iterator lower_bound(typename Vec::iterator start, typename Vec::i template < typename It, typename T, typename Cmp > inline It binary_find(It start, It end, const T& value, Cmp cmp) { It lower = lower_bound(start, end, value, cmp); - bool found = lower != end && !cmp(value, *lower); - return found ? lower : end; + return It((lower != end && !cmp(value, *lower)) ? lower : end); } template < typename It, typename T > diff --git a/include/rstl/vector.hpp b/include/rstl/vector.hpp index 35db2c117..1073bd6c3 100644 --- a/include/rstl/vector.hpp +++ b/include/rstl/vector.hpp @@ -27,7 +27,13 @@ class vector { typedef int size_type; typedef T value_type; - iterator begin() { return iterator(this, data()); } + iterator begin() { +#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02 + return iterator(this, xc_items); +#else + return iterator(this, data()); +#endif + } const_iterator begin() const { return const_iterator(this, data()); } iterator end() { T* const end = data() + x4_count; diff --git a/src/MetroidPrime/CTransitionDatabaseGame.cpp b/src/MetroidPrime/CTransitionDatabaseGame.cpp index 521f83388..6b766d669 100644 --- a/src/MetroidPrime/CTransitionDatabaseGame.cpp +++ b/src/MetroidPrime/CTransitionDatabaseGame.cpp @@ -10,9 +10,8 @@ struct uint_comparer { bool operator()(uint a, uint b) const { return a < b; } bool operator()(const rstl::pair< uint, uint >& a, const rstl::pair< uint, uint >& b) const { const uint& aTo = a.second; - const uint& bTo = b.second; if (a.first == b.first) { - return aTo < bTo; + return aTo < b.second; } return a.first < b.first; } From 1ed12565d05aa80a8cba5a08125736aeb8a5fc5d Mon Sep 17 00:00:00 2001 From: Henrique Gemignani Passos Lima Date: Wed, 16 Sep 2026 22:04:25 +0300 Subject: [PATCH 2/2] Fix CTransitionDatabaseGame and CAi inlining --- configure.py | 16 ++++++++++++++-- include/rstl/vector.hpp | 8 +------- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/configure.py b/configure.py index 8183676f3..5f22a0def 100755 --- a/configure.py +++ b/configure.py @@ -596,7 +596,13 @@ def EquivalentFor(*versions): Object(NonMatching, "MetroidPrime/CGameArea.cpp"), Object(NonMatching, "MetroidPrime/HUD/CSamusHud.cpp"), Object(MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/CAnimationDatabaseGame.cpp"), - Object(MatchingFor("GM8P01_00"), "MetroidPrime/CTransitionDatabaseGame.cpp"), + Object( + MatchingFor("GM8P01_00"), + "MetroidPrime/CTransitionDatabaseGame.cpp", + extra_cflags=['-pragma "inline_max_size(126)"'] + if version_num >= VERSIONS.index("GM8P01_00") + else [], + ), Object( MatchingFor("GM8E01_00", "GM8E01_01", "GM8P01_00"), "MetroidPrime/Tweaks/CTweakPlayerControl.cpp", @@ -647,7 +653,13 @@ def EquivalentFor(*versions): "MetroidPrime/ScriptObjects/CScriptCounter.cpp", ), Object(NonMatching, "MetroidPrime/CMapWorld.cpp"), - Object(NonMatching, "MetroidPrime/Enemies/CAi.cpp"), + Object( + NonMatching, + "MetroidPrime/Enemies/CAi.cpp", + extra_cflags=['-pragma "inline_max_size(126)"'] + if version_num >= VERSIONS.index("GM8P01_00") + else [], + ), Object( MatchingFor("GM8E01_00", "GM8E01_01"), "MetroidPrime/Enemies/PatternedCastTo.cpp", diff --git a/include/rstl/vector.hpp b/include/rstl/vector.hpp index 1073bd6c3..35db2c117 100644 --- a/include/rstl/vector.hpp +++ b/include/rstl/vector.hpp @@ -27,13 +27,7 @@ class vector { typedef int size_type; typedef T value_type; - iterator begin() { -#if VERSION >= VERSION_GM8P_00 && VERSION != VERSION_GM8E_02 - return iterator(this, xc_items); -#else - return iterator(this, data()); -#endif - } + iterator begin() { return iterator(this, data()); } const_iterator begin() const { return const_iterator(this, data()); } iterator end() { T* const end = data() + x4_count;