File tree Expand file tree Collapse file tree 2 files changed +89
-105
lines changed Expand file tree Collapse file tree 2 files changed +89
-105
lines changed Original file line number Diff line number Diff line change @@ -143,8 +143,8 @@ public:
143143 // and we prefer the smaller Size_T to reduce the size of each RVec object.
144144 using Size_T = int32_t ;
145145
146- void *fBeginX ;
147146protected:
147+ void *fBeginX ;
148148 // / Always >= 0.
149149 // Type is signed only for consistency with fCapacity.
150150 Size_T fSize = 0 ;
@@ -213,7 +213,9 @@ class R__CLING_PTRCHECK(off) SmallVectorTemplateCommon : public SmallVectorBase
213213 // / SmallVectorStorage is properly-aligned even for small-size of 0.
214214 void *getFirstEl () const
215215 {
216- return const_cast <void *>(reinterpret_cast <const void *>(reinterpret_cast <const char *>(this ) +
216+ // get the SmallVectorBase subobject inside RVec
217+ auto *base = static_cast <const SmallVectorBase *>(this );
218+ return const_cast <void *>(reinterpret_cast <const void *>(reinterpret_cast <const char *>(base) +
217219 offsetof (SmallVectorAlignmentAndSize<T>, FirstEl)));
218220 }
219221 // Space after 'FirstEl' is clobbered, do not add any instance vars after it.
You can’t perform that action at this time.
0 commit comments