From 06b91e4cd4003e62e832776407d50a043b5aefd4 Mon Sep 17 00:00:00 2001 From: Henning Baldersheim Date: Tue, 24 Jul 2018 16:04:17 +0200 Subject: - NULL -> nullptr - nested namespaces - = default; --- .../features/internal_max_reduce_prod_join_feature.cpp | 14 ++++---------- .../features/internal_max_reduce_prod_join_feature.h | 4 +--- .../vespa/searchlib/features/rankingexpressionfeature.cpp | 6 ++---- searchlib/src/vespa/searchlib/fef/featureexecutor.h | 8 ++------ searchlib/src/vespa/searchlib/fef/indexproperties.h | 13 +++---------- searchlib/src/vespa/searchlib/fef/number_or_object.h | 6 ++---- searchlib/src/vespa/searchlib/fef/ranksetup.cpp | 8 +++----- searchlib/src/vespa/searchlib/fef/ranksetup.h | 6 ++---- 8 files changed, 19 insertions(+), 46 deletions(-) (limited to 'searchlib') diff --git a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp index 90451c01294..b096e6e8ff5 100644 --- a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp +++ b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.cpp @@ -3,16 +3,16 @@ #include "internal_max_reduce_prod_join_feature.h" #include "valuefeature.h" #include "weighted_set_parser.h" +#include "dotproductfeature.h" -#include #include #include #include -#include #include #include #include +#include LOG_SETUP(".features.internalmaxreduceprodjoin"); using namespace search::attribute; @@ -20,8 +20,7 @@ using namespace search::fef; using search::features::dotproduct::wset::IntegerVector; -namespace search { -namespace features { +namespace search::features { /** * Executor used when array can be accessed directly @@ -38,8 +37,7 @@ public: }; template -RawExecutor::RawExecutor(const IAttributeVector *attribute, - const IntegerVector &queryVector) : +RawExecutor::RawExecutor(const IAttributeVector *attribute, const IntegerVector &queryVector) : FeatureExecutor(), _attribute(attribute), _queryVector(queryVector) @@ -215,8 +213,4 @@ InternalMaxReduceProdJoinBlueprint::createExecutor(const IQueryEnvironment &env, return stash.create(); } - } -} - - diff --git a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.h b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.h index 2c576b58345..65dd0ac2082 100644 --- a/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.h +++ b/searchlib/src/vespa/searchlib/features/internal_max_reduce_prod_join_feature.h @@ -4,8 +4,7 @@ #include -namespace search { -namespace features { +namespace search::features { /** * Feature for the specific replacement of the expression: @@ -41,4 +40,3 @@ public: }; } -} diff --git a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp index 4640170e6b9..c6eeafd772f 100644 --- a/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp +++ b/searchlib/src/vespa/searchlib/features/rankingexpressionfeature.cpp @@ -26,8 +26,7 @@ using search::fef::FeatureType; using vespalib::ArrayRef; using vespalib::ConstArrayRef; -namespace search { -namespace features { +namespace search::features { namespace { @@ -305,5 +304,4 @@ RankingExpressionBlueprint::createExecutor(const fef::IQueryEnvironment &env, ve //----------------------------------------------------------------------------- -} // features -} // search +} diff --git a/searchlib/src/vespa/searchlib/fef/featureexecutor.h b/searchlib/src/vespa/searchlib/fef/featureexecutor.h index c8219fada3b..dfc46230e18 100644 --- a/searchlib/src/vespa/searchlib/fef/featureexecutor.h +++ b/searchlib/src/vespa/searchlib/fef/featureexecutor.h @@ -4,12 +4,10 @@ #include "handle.h" #include "matchdata.h" -#include #include "number_or_object.h" #include -namespace search { -namespace fef { +namespace search::fef { class FeatureExecutor; @@ -181,8 +179,6 @@ vespalib::eval::Value::CREF FeatureExecutor::Inputs::get_object(size_t idx) cons return _inputs[idx].as_object(_docid); } -} // namespace fef -} // namespace search - +} // LocalWords: param diff --git a/searchlib/src/vespa/searchlib/fef/indexproperties.h b/searchlib/src/vespa/searchlib/fef/indexproperties.h index a2a227b448c..38e0eca7548 100644 --- a/searchlib/src/vespa/searchlib/fef/indexproperties.h +++ b/searchlib/src/vespa/searchlib/fef/indexproperties.h @@ -6,10 +6,7 @@ #include #include -namespace search { -namespace fef { - -class Properties; +namespace search::fef { class Properties; } /** * This namespace is a placeholder for several structs, each representing @@ -19,7 +16,7 @@ class Properties; * instance one should use the property names defined here to perform the lookup. * If the property is not present the default value is used. **/ -namespace indexproperties { +namespace search::fef::indexproperties { namespace eval { @@ -357,8 +354,4 @@ struct QueryFeature { } // namespace type - -} // namespace indexproperties -} // namespace fef -} // namespace search - +} diff --git a/searchlib/src/vespa/searchlib/fef/number_or_object.h b/searchlib/src/vespa/searchlib/fef/number_or_object.h index 59de864961e..259a1622516 100644 --- a/searchlib/src/vespa/searchlib/fef/number_or_object.h +++ b/searchlib/src/vespa/searchlib/fef/number_or_object.h @@ -5,8 +5,7 @@ #include #include -namespace search { -namespace fef { +namespace search::fef { /** * Storage cell for values passed between feature executors in the @@ -21,5 +20,4 @@ union NumberOrObject { ~NumberOrObject() {} }; -} // namespace fef -} // namespace search +} diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp index 5a16b1b6ba8..eea9188632d 100644 --- a/searchlib/src/vespa/searchlib/fef/ranksetup.cpp +++ b/searchlib/src/vespa/searchlib/fef/ranksetup.cpp @@ -20,8 +20,7 @@ public: }; } // namespace -namespace search { -namespace fef { +namespace search::fef { using namespace indexproperties; @@ -61,7 +60,7 @@ RankSetup::RankSetup(const BlueprintFactory &factory, const IIndexEnvironment &i _softTimeoutTailCost(0.1) { } -RankSetup::~RankSetup() { } +RankSetup::~RankSetup() = default; void RankSetup::configure() @@ -190,5 +189,4 @@ RankSetup::prepareSharedState(const IQueryEnvironment &queryEnv, IObjectStore &o } } -} // namespace fef -} // namespace search +} diff --git a/searchlib/src/vespa/searchlib/fef/ranksetup.h b/searchlib/src/vespa/searchlib/fef/ranksetup.h index cccb3d961d5..ef869c87740 100644 --- a/searchlib/src/vespa/searchlib/fef/ranksetup.h +++ b/searchlib/src/vespa/searchlib/fef/ranksetup.h @@ -8,8 +8,7 @@ #include "blueprintresolver.h" #include "rank_program.h" -namespace search { -namespace fef { +namespace search::fef { /** * A rank setup contains information about how initial and final rank @@ -403,5 +402,4 @@ public: void prepareSharedState(const IQueryEnvironment & queryEnv, IObjectStore & objectStore) const; }; -} // namespace fef -} // namespace search +} -- cgit v1.2.3