From eebfcfb56a9972bb5408f1b49a9d7749bcb17444 Mon Sep 17 00:00:00 2001 From: Jakob Blomer <jblomer@cern.ch> Date: Tue, 30 Apr 2019 14:06:03 +0200 Subject: [PATCH] [forest] use unique_ptr<TFile> in tutorial --- tutorials/v7/forest/fst003_lhcbOpenData.C | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tutorials/v7/forest/fst003_lhcbOpenData.C b/tutorials/v7/forest/fst003_lhcbOpenData.C index 5a9a4a61b18..0607cb28fa9 100644 --- a/tutorials/v7/forest/fst003_lhcbOpenData.C +++ b/tutorials/v7/forest/fst003_lhcbOpenData.C @@ -43,8 +43,8 @@ constexpr char const* kForestFile = "fst003_lhcbOpenData.root"; void Convert() { - auto f = TFile::Open(kTreeFile); - assert(f != nullptr); + std::unique_ptr<TFile> f(TFile::Open(kTreeFile)); + assert(f.is_valid()); // Get a unique pointer to an empty RForest model auto model = RForestModel::Create(); -- GitLab