diff options
author | Arne Juul <arnej@verizonmedia.com> | 2020-07-15 13:54:57 +0000 |
---|---|---|
committer | Arne Juul <arnej@verizonmedia.com> | 2020-07-15 15:39:26 +0000 |
commit | ef9ba8529ace59780fbc50ccb153336d44dc4a15 (patch) | |
tree | ddecf6e92959bcb29671c73240cc1b2f11b108be /searchsummary/src | |
parent | 24ed2059c3f98cdf81ce84a340e445992aaf3407 (diff) |
avoid negated flag
Diffstat (limited to 'searchsummary/src')
3 files changed, 7 insertions, 6 deletions
diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp index dd9b77816a9..0af92adf2d2 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.cpp @@ -8,7 +8,7 @@ GetDocsumArgs::GetDocsumArgs() : _ranking(), _resultClassName(), _dumpFeatures(false), - _no_locations(false), + _locations_possible(true), _stackItems(0), _stackDump(), _location(), @@ -28,6 +28,7 @@ GetDocsumArgs::initFromDocsumRequest(const search::engine::DocsumRequest &req) _stackItems = req.stackItems; _stackDump = req.stackDump; _location = req.location; + _locations_possible = true; _timeout = req.getTimeLeft(); _propertiesMap = req.propertiesMap; } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h index 3d9370a20d7..0231b004674 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h +++ b/searchsummary/src/vespa/searchsummary/docsummary/getdocsumargs.h @@ -17,7 +17,7 @@ private: vespalib::string _ranking; vespalib::string _resultClassName; bool _dumpFeatures; - bool _no_locations; + bool _locations_possible; uint32_t _stackItems; std::vector<char> _stackDump; vespalib::string _location; @@ -32,8 +32,8 @@ public: void SetRankProfile(const vespalib::string &ranking) { _ranking = ranking; } void setResultClassName(vespalib::stringref name) { _resultClassName = name; } void SetStackDump(uint32_t stackItems, uint32_t stackDumpLen, const char *stackDump); - void no_locations(bool value) { _no_locations = value; } - bool no_locations() const { return _no_locations; } + void locations_possible(bool value) { _locations_possible = value; } + bool locations_possible() const { return _locations_possible; } const vespalib::string &getLocation() const { return _location; } void setLocation(const vespalib::string & location) { _location = location; } void setTimeout(vespalib::duration timeout) { _timeout = timeout; } diff --git a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp index 182229b3647..4fc2b1f4221 100644 --- a/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp +++ b/searchsummary/src/vespa/searchsummary/docsummary/positionsdfw.cpp @@ -26,7 +26,7 @@ LocationAttrDFW::AllLocations LocationAttrDFW::getAllLocations(GetDocsumsState *state) { AllLocations retval; - if (state->_args.no_locations()) { + if (! state->_args.locations_possible()) { return retval; } if (state->_parsedLocations.empty()) { @@ -45,7 +45,7 @@ LocationAttrDFW::getAllLocations(GetDocsumsState *state) } if (retval.empty()) { // avoid doing things twice - state->_args.no_locations(true); + state->_args.locations_possible(false); } return retval; } |