File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2626#include " TClass.h"
2727#include " Bytes.h"
2828
29+ #include < limits>
2930#include < vector>
3031#include < string>
3132
@@ -228,6 +229,27 @@ class TBuffer : public TObject {
228229 virtual TVirtualArray *PopDataCache ();
229230 virtual void PushDataCache (TVirtualArray *);
230231
232+ TClass *ReadClass (const TClass *cl, UInt_t *objTag)
233+ R__DEPRECATED(6 , 42 , " Use the overload with ULong64_t* for objTag instead" )
234+ {
235+ if (objTag) {
236+ ULong64_t objTag64 = 0 ;
237+
238+ auto result = ReadClass (cl, &objTag64);
239+ if (objTag64 > std::numeric_limits<UInt_t>::max ()) {
240+ Error (" ReadClass" ,
241+ " Object tag value %llu exceeds maximum of %u for 32-bit tag. Consider using the overload with "
242+ " ULong64_t* for objTag instead." ,
243+ objTag64, std::numeric_limits<UInt_t>::max ());
244+ return result;
245+ }
246+ *objTag = static_cast <UInt_t>(objTag64);
247+ return result;
248+ } else {
249+ return ReadClass (cl, static_cast <ULong64_t *>(nullptr ));
250+ }
251+ }
252+
231253 virtual TClass *ReadClass (const TClass *cl = nullptr , ULong64_t *objTag = nullptr ) = 0;
232254 virtual void WriteClass (const TClass *cl) = 0;
233255
You can’t perform that action at this time.
0 commit comments