@@ -48,6 +48,11 @@ namespace geode
4848 using Deserializer =
4949 bitsery::Deserializer< bitsery::InputStreamAdapter, TContext >;
5050
51+ enum struct BITSERY
52+ {
53+ constructor
54+ };
55+
5156 /* !
5257 * Register all the information needed by Bitsery to serialize the objects
5358 * in the basic library.
@@ -87,8 +92,10 @@ namespace geode
8792 template < template < typename > class Attribute , typename T >
8893 void import_old_attribute ( AttributeManager &manager,
8994 std::string_view old_attribute_name,
90- geode::uuid new_attribute_id )
95+ geode::uuid new_attribute_id,
96+ index_t attribute_size )
9197 {
98+ DEBUG ( " import_old_attribute" );
9299 const auto ids =
93100 manager.attribute_ids_with_name ( old_attribute_name ).value ();
94101 DEBUG ( ids.size () );
@@ -106,14 +113,14 @@ namespace geode
106113 manager.read_attribute < T >( old_attribute_id );
107114 auto new_attribute =
108115 manager.find_attribute < Attribute, T >( new_attribute_id );
109- manager.resize ( old_attribute-> nb_items () );
110- for ( const auto index : geode::Range{ old_attribute-> nb_items () } )
116+ manager.resize ( attribute_size );
117+ for ( const auto index : geode::Range{ attribute_size } )
111118 {
112- SDEBUG ( old_attribute->value ( index ) );
113119 new_attribute->set_value (
114120 index, old_attribute->value ( index ) );
115121 }
116122 manager.delete_attribute ( old_attribute_id );
123+ DEBUG ( " import_old_attribute done" );
117124 }
118125 } // namespace detail
119126} // namespace geode
0 commit comments