@@ -370,6 +370,7 @@ namespace df
370
370
return ((uint8_t *)ptr) + idx * item->byte_size ();
371
371
}
372
372
};
373
+ #endif
373
374
374
375
template <class T >
375
376
class stl_container_identity : public container_identity {
@@ -406,6 +407,7 @@ namespace df
406
407
}
407
408
};
408
409
410
+ #ifdef BUILD_DFHACK_LIB
409
411
template <class T >
410
412
class ro_stl_container_identity : public container_identity {
411
413
protected:
@@ -667,6 +669,18 @@ namespace df
667
669
static stl_ptr_vector_identity *get ();
668
670
};
669
671
672
+ // explicit specializations for these two types
673
+ // for availability in plugins
674
+
675
+ template <> struct identity_traits <std::vector<int32_t > > {
676
+ static container_identity* get ();
677
+ };
678
+
679
+ template <> struct identity_traits <std::vector<int16_t > > {
680
+ static container_identity* get ();
681
+ };
682
+
683
+
670
684
#ifdef BUILD_DFHACK_LIB
671
685
template <class T > struct identity_traits <std::deque<T> > {
672
686
static container_identity *get ();
@@ -739,6 +753,19 @@ namespace df
739
753
return &identity;
740
754
}
741
755
756
+ // explicit specializations for these two types
757
+ // for availability in plugins
758
+
759
+ extern DFHACK_EXPORT stl_container_identity<std::vector<int32_t > > stl_vector_int32_t_identity;
760
+ inline container_identity* identity_traits<std::vector<int32_t > >::get() {
761
+ return &stl_vector_int32_t_identity;
762
+ }
763
+
764
+ extern DFHACK_EXPORT stl_container_identity<std::vector<int16_t > > stl_vector_int16_t_identity;
765
+ inline container_identity* identity_traits<std::vector<int16_t > >::get() {
766
+ return &stl_vector_int16_t_identity;
767
+ }
768
+
742
769
#ifdef BUILD_DFHACK_LIB
743
770
template <class T >
744
771
inline container_identity *identity_traits<std::deque<T> >::get() {
0 commit comments