diff --git a/core/.clang-format b/core/.clang-format new file mode 100644 index 0000000000000..a6a6abe335dcc --- /dev/null +++ b/core/.clang-format @@ -0,0 +1,20 @@ +BasedOnStyle: InheritParentConfig + +AlignConsecutiveAssignments: + Enabled: true + AcrossEmptyLines: false + AcrossComments: true + AlignCompound: true + PadOperators: true +AlignConsecutiveBitFields: + Enabled: true + AcrossEmptyLines: false + AcrossComments: false +AlignConsecutiveDeclarations: + Enabled: true + # Part of clang-format 20.1.0 + AlignFunctionDeclarations: true + +# Part of clang-format 22 +# IndentPPDirectives: Leave +IndentPPDirectives: None diff --git a/core/base/inc/TBuffer.h b/core/base/inc/TBuffer.h index 7c874d84be3d6..5490b90f5d58c 100644 --- a/core/base/inc/TBuffer.h +++ b/core/base/inc/TBuffer.h @@ -26,6 +26,7 @@ #include "TClass.h" #include "Bytes.h" +#include #include #include @@ -228,6 +229,27 @@ class TBuffer : public TObject { virtual TVirtualArray *PopDataCache(); virtual void PushDataCache(TVirtualArray *); + TClass *ReadClass(const TClass *cl, UInt_t *objTag) + R__DEPRECATED(6, 42, "Use the overload with ULong64_t* for objTag instead") + { + if (objTag) { + ULong64_t objTag64 = 0; + + auto result = ReadClass(cl, &objTag64); + if (objTag64 > std::numeric_limits::max()) { + Error("ReadClass", + "Object tag value %llu exceeds maximum of %u for 32-bit tag. Consider using the overload with " + "ULong64_t* for objTag instead.", + objTag64, std::numeric_limits::max()); + return result; + } + *objTag = static_cast(objTag64); + return result; + } else { + return ReadClass(cl, static_cast(nullptr)); + } + } + virtual TClass *ReadClass(const TClass *cl = nullptr, ULong64_t *objTag = nullptr) = 0; virtual void WriteClass(const TClass *cl) = 0;