Skip to content

Commit

Permalink
fix: Pass unique_ptr by Value
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristianTackeGSI authored and dennisklein committed Nov 11, 2022
1 parent 62a27a4 commit c6e4928
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions base/steer/FairRun.cxx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -171,7 +171,7 @@ Bool_t FairRun::GetWriteRunInfoFile()
return fGenerateRunInfo;
}

void FairRun::SetSink(std::unique_ptr<FairSink>&& newsink)
void FairRun::SetSink(std::unique_ptr<FairSink> newsink)
{
fSink = std::move(newsink);
fRootManager->SetSink(fSink.get());
Expand Down
4 changes: 2 additions & 2 deletions base/steer/FairRun.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2014-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence (LGPL) version 3, *
Expand Down Expand Up @@ -84,7 +84,7 @@ class FairRun : public TNamed
/**
* Set the sink
*/
void SetSink(std::unique_ptr<FairSink>&& newsink);
void SetSink(std::unique_ptr<FairSink> newsink);
void SetSink(FairSink* tempSink);
/**
* return a non-owning pointer to the sink
Expand Down
4 changes: 2 additions & 2 deletions examples/MQ/pixelDetector/src/devices/FairMQSimDevice.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/********************************************************************************
* Copyright (C) 2017 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* Copyright (C) 2017-2022 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
* *
* This software is distributed under the terms of the *
* GNU Lesser General Public Licence version 3 (LGPL) version 3, *
Expand Down Expand Up @@ -52,7 +52,7 @@ class FairMQSimDevice : public FairMQRunDevice
void SetSecondParameter(FairParIo* par) { fSecondParameter = par; }
void SetUserConfig(const TString& Config) { fUserConfig = Config; }
void SetUserCuts(const TString& Cuts) { fUserCuts = Cuts; }
void SetSink(std::unique_ptr<FairSink>&& sink) { fSink = std::move(sink); }
void SetSink(std::unique_ptr<FairSink> sink) { fSink = std::move(sink); }
// ------ ---------- -------- ------

void InitializeRun();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ class FairMQTransportDevice : public FairMQRunDevice
void SetSecondParameter(FairParIo* par) { fSecondParameter = par; };
void SetUserConfig(const TString& Config) { fUserConfig = Config; }
void SetUserCuts(const TString& Cuts) { fUserCuts = Cuts; }
void SetSink(std::unique_ptr<FairSink>&& sink) { fSink = std::move(sink); }
void SetSink(std::unique_ptr<FairSink> sink) { fSink = std::move(sink); }
// ------ ---------- -------- ------

void InitializeRun();
Expand Down

0 comments on commit c6e4928

Please sign in to comment.