Skip to content

Commit e60d21f

Browse files
committed
Please consider the following formatting changes
1 parent 045edb4 commit e60d21f

File tree

4 files changed

+13
-10
lines changed

4 files changed

+13
-10
lines changed

Framework/Core/include/Framework/DataRefUtils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ struct DataRefUtils {
151151

152152
typename RSS::FairInputTBuffer ftm(const_cast<char*>(ref.payload), payloadSize);
153153
ftm.InitMap();
154-
auto *classInfo = ftm.ReadClass();
154+
auto* classInfo = ftm.ReadClass();
155155
ftm.SetBufferOffset(0);
156156
ftm.ResetMap();
157157
result.reset(static_cast<wrapped*>(ftm.ReadObjectAny(cl)));

Framework/Core/include/Framework/TMessageSerializer.h

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,8 @@ class FairInputTBuffer : public TBufferFile
6565
// of overhead, where the source embedded the pointer for the reallocation.
6666
// Notice this will break if the sender and receiver are not using the same
6767
// size for a pointer.
68-
FairInputTBuffer(char * data, size_t size)
69-
: TBufferFile(TBuffer::kRead, size-sizeof(char*), data + sizeof(char*), false, nullptr)
68+
FairInputTBuffer(char* data, size_t size)
69+
: TBufferFile(TBuffer::kRead, size - sizeof(char*), data + sizeof(char*), false, nullptr)
7070
{
7171
}
7272
};
@@ -86,7 +86,7 @@ struct TMessageSerializer {
8686
static void serialize(o2::framework::FairOutputTBuffer& msg, const T* input, const TClass* cl);
8787

8888
template <typename T = TObject>
89-
static inline std::unique_ptr<T> deserialize(FairInputTBuffer & buffer);
89+
static inline std::unique_ptr<T> deserialize(FairInputTBuffer& buffer);
9090
};
9191

9292
inline void TMessageSerializer::serialize(FairOutputTBuffer& tm, const TObject* input)
@@ -106,7 +106,7 @@ inline void TMessageSerializer::serialize(FairOutputTBuffer& tm, const T* input,
106106
}
107107

108108
template <typename T>
109-
inline std::unique_ptr<T> TMessageSerializer::deserialize(FairInputTBuffer & buffer)
109+
inline std::unique_ptr<T> TMessageSerializer::deserialize(FairInputTBuffer& buffer)
110110
{
111111
TClass* tgtClass = TClass::GetClass(typeid(T));
112112
if (tgtClass == nullptr) {

Framework/Core/src/TMessageSerializer.cxx

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515

1616
using namespace o2::framework;
1717

18-
void* FairOutputTBuffer::embedInItself(fair::mq::Message& msg) {
18+
void* FairOutputTBuffer::embedInItself(fair::mq::Message& msg)
19+
{
1920
// The first bytes of the message are used to store the pointer to the message itself
2021
// so that we can reallocate it if needed.
2122
if (sizeof(char*) > msg.GetSize()) {
@@ -28,7 +29,8 @@ void* FairOutputTBuffer::embedInItself(fair::mq::Message& msg) {
2829
}
2930

3031
// Reallocation function. Get the message pointer from the data and call Rebuild.
31-
char *FairOutputTBuffer::fairMQrealloc(char *oldData, size_t newSize, size_t oldSize) {
32+
char* FairOutputTBuffer::fairMQrealloc(char* oldData, size_t newSize, size_t oldSize)
33+
{
3234
auto* msg = reinterpret_cast<fair::mq::Message*>(oldData - sizeof(char*));
3335
if (newSize <= msg->GetSize()) {
3436
// no need to reallocate, the message is already big enough

Framework/Core/test/test_DataRefUtils.cxx

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,20 +21,21 @@
2121

2222
using namespace o2::framework;
2323

24-
TEST_CASE("PureRootTest") {
24+
TEST_CASE("PureRootTest")
25+
{
2526
TBufferFile buffer(TBuffer::kWrite);
2627
TObjString s("test");
2728
buffer.WriteObject(&s);
2829

2930
TBufferFile buffer2(TBuffer::kRead, buffer.BufferSize(), buffer.Buffer(), false);
3031
buffer2.SetReadMode();
3132
buffer2.InitMap();
32-
TClass *storedClass = buffer2.ReadClass();
33+
TClass* storedClass = buffer2.ReadClass();
3334
// ReadClass advances the buffer, so we need to reset it.
3435
buffer2.SetBufferOffset(0);
3536
buffer2.ResetMap();
3637
REQUIRE(storedClass != nullptr);
37-
auto *outS = (TObjString*)buffer2.ReadObjectAny(storedClass);
38+
auto* outS = (TObjString*)buffer2.ReadObjectAny(storedClass);
3839
REQUIRE(outS != nullptr);
3940
REQUIRE(outS->GetString() == "test");
4041
}

0 commit comments

Comments
 (0)