From cb74fbeb0aef6bf57a672b7a13a33e360e100eb1 Mon Sep 17 00:00:00 2001 From: Enrico Guiraud Date: Mon, 3 May 2021 16:59:45 +0200 Subject: [PATCH] [DF][NFC] Fix warnings on Ubuntu 16 Should fix the warnings visible e.g. [here](https://github.com/root-project/root/pull/6770#issuecomment-831306059) and [here](https://github.com/root-project/root/pull/8070#issuecomment-831247436). --- tree/dataframe/src/RDFGraphUtils.cxx | 5 ++--- tree/dataframe/src/RDFInterfaceUtils.cxx | 15 +++++++-------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/tree/dataframe/src/RDFGraphUtils.cxx b/tree/dataframe/src/RDFGraphUtils.cxx index 1bbb88f240318..77b816a0682fb 100644 --- a/tree/dataframe/src/RDFGraphUtils.cxx +++ b/tree/dataframe/src/RDFGraphUtils.cxx @@ -140,8 +140,7 @@ std::shared_ptr CreateRangeNode(const ROOT::Detail::RDF::RRangeBase * return node; } -std::shared_ptr AddDefinesToGraph(std::shared_ptr node, - const RDFInternal::RBookedDefines &defines, +std::shared_ptr AddDefinesToGraph(std::shared_ptr node, const RBookedDefines &defines, const std::vector &prevNodeDefines) { auto upmostNode = node; @@ -150,7 +149,7 @@ std::shared_ptr AddDefinesToGraph(std::shared_ptr node, for (auto i = int(defineNames.size()) - 1; i >= 0; --i) { // walk backwards through the names of defined columns const auto colName = defineNames[i]; const bool isAlias = defineMap.find(colName) == defineMap.end(); - if (isAlias || RDFInternal::IsInternalColumn(colName)) + if (isAlias || IsInternalColumn(colName)) continue; // aliases appear in the list of defineNames but we don't support them yet const bool isANewDefine = std::find(prevNodeDefines.begin(), prevNodeDefines.end(), colName) == prevNodeDefines.end(); diff --git a/tree/dataframe/src/RDFInterfaceUtils.cxx b/tree/dataframe/src/RDFInterfaceUtils.cxx index ddcabb32952fe..c0db09120db82 100644 --- a/tree/dataframe/src/RDFInterfaceUtils.cxx +++ b/tree/dataframe/src/RDFInterfaceUtils.cxx @@ -411,7 +411,7 @@ ConvertRegexToColumns(const ColumnNames_t &colNames, std::string_view columnName // we need to use TPRegexp TPRegexp regexp(theRegex); for (auto &&colName : colNames) { - if ((isEmptyRegex || regexp.MatchB(colName.c_str())) && !RDFInternal::IsInternalColumn(colName)) { + if ((isEmptyRegex || regexp.MatchB(colName.c_str())) && !IsInternalColumn(colName)) { selectedColumns.emplace_back(colName); } } @@ -584,8 +584,7 @@ std::string PrettyPrintAddr(const void *const addr) void BookFilterJit(const std::shared_ptr &jittedFilter, std::shared_ptr *prevNodeOnHeap, std::string_view name, std::string_view expression, const std::map &aliasMap, - const ColumnNames_t &branches, const RDFInternal::RBookedDefines &customCols, TTree *tree, - RDataSource *ds) + const ColumnNames_t &branches, const RBookedDefines &customCols, TTree *tree, RDataSource *ds) { const auto &dsColumns = ds ? ds->GetColumnNames() : ColumnNames_t{}; @@ -629,7 +628,7 @@ void BookFilterJit(const std::shared_ptr &jittedFilter, // Jit a Define call std::shared_ptr BookDefineJit(std::string_view name, std::string_view expression, RLoopManager &lm, - RDataSource *ds, const RDFInternal::RBookedDefines &customCols, + RDataSource *ds, const RBookedDefines &customCols, const ColumnNames_t &branches, std::shared_ptr *upcastNodeOnHeap) { @@ -644,7 +643,7 @@ std::shared_ptr BookDefineJit(std::string_view name, std::string_ const auto lambdaName = DeclareLambda(parsedExpr.fExpr, parsedExpr.fVarNames, exprVarTypes); const auto type = RetTypeOfLambda(lambdaName); - auto definesCopy = new RDFInternal::RBookedDefines(customCols); + auto definesCopy = new RBookedDefines(customCols); auto definesAddr = PrettyPrintAddr(definesCopy); auto jittedDefine = std::make_shared(name, type, lm.GetNSlots(), lm.GetDSValuePtrs()); @@ -676,8 +675,8 @@ std::shared_ptr BookDefineJit(std::string_view name, std::string_ // (see comments in the body for actual jitted code) std::string JitBuildAction(const ColumnNames_t &cols, std::shared_ptr *prevNode, const std::type_info &helperArgType, const std::type_info &at, void *helperArgOnHeap, - TTree *tree, const unsigned int nSlots, const RDFInternal::RBookedDefines &customCols, - RDataSource *ds, std::weak_ptr *jittedActionOnHeap) + TTree *tree, const unsigned int nSlots, const RBookedDefines &customCols, RDataSource *ds, + std::weak_ptr *jittedActionOnHeap) { // retrieve type of result of the action as a string auto helperArgClass = TClass::GetClass(helperArgType); @@ -696,7 +695,7 @@ std::string JitBuildAction(const ColumnNames_t &cols, std::shared_ptrGetName(); const std::string actionTypeNameBase = actionTypeName.substr(actionTypeName.rfind(':') + 1); - auto definesCopy = new RDFInternal::RBookedDefines(customCols); // deleted in jitted CallBuildAction + auto definesCopy = new RBookedDefines(customCols); // deleted in jitted CallBuildAction auto definesAddr = PrettyPrintAddr(definesCopy); // Build a call to CallBuildAction with the appropriate argument. When run through the interpreter, this code will