summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-01-02 10:26:19 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-01-02 10:26:19 +0000
commit9369597f64c4b1cf5eabb9f974165910d4f2fae0 (patch)
treec5d66f5ae60f84c190a8bbc39e8c9a11d36ffbb6
parent7629021f657614aa4428584a71084e85b52f378b (diff)
GC unused code
-rw-r--r--searchcommon/src/vespa/searchcommon/attribute/basictype.h2
-rw-r--r--searchlib/src/vespa/searchlib/attribute/numericbase.h8
-rw-r--r--searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h5
3 files changed, 4 insertions, 11 deletions
diff --git a/searchcommon/src/vespa/searchcommon/attribute/basictype.h b/searchcommon/src/vespa/searchcommon/attribute/basictype.h
index 9be26b0816b..926246c7029 100644
--- a/searchcommon/src/vespa/searchcommon/attribute/basictype.h
+++ b/searchcommon/src/vespa/searchcommon/attribute/basictype.h
@@ -34,7 +34,6 @@ class BasicType
Type type() const { return _type; }
const char * asString() const { return asString(_type); }
- bool isUnsigned() const { return isUnsigned(_type); }
size_t fixedSize() const { return fixedSize(_type); }
static BasicType fromType(bool) { return BOOL; }
static BasicType fromType(int8_t) { return INT8; }
@@ -48,7 +47,6 @@ class BasicType
private:
static const char * asString(Type t) { return _typeTable[t]._name; }
- static bool isUnsigned(Type t) { return _typeTable[t]._name[0] == 'u'; }
static size_t fixedSize(Type t) { return _typeTable[t]._fixedSize; }
static Type asType(const vespalib::string & t);
diff --git a/searchlib/src/vespa/searchlib/attribute/numericbase.h b/searchlib/src/vespa/searchlib/attribute/numericbase.h
index 87cccfec185..67be41fe98a 100644
--- a/searchlib/src/vespa/searchlib/attribute/numericbase.h
+++ b/searchlib/src/vespa/searchlib/attribute/numericbase.h
@@ -65,7 +65,7 @@ protected:
template <typename BaseType>
search::Range<BaseType>
- cappedRange(bool isFloat, bool isUnsigned)
+ cappedRange(bool isFloat)
{
BaseType low = static_cast<BaseType>(_low);
BaseType high = static_cast<BaseType>(_high);
@@ -79,11 +79,7 @@ protected:
}
} else {
if (_low <= (numMin)) {
- if (isUnsigned) {
- low = numMin;
- } else {
- low = numMin + 1; // we must avoid the undefined value
- }
+ low = numMin + 1; // we must avoid the undefined value
}
}
diff --git a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
index 78778e8085a..68b9ae5da7b 100644
--- a/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
+++ b/searchlib/src/vespa/searchlib/attribute/postinglistsearchcontext.h
@@ -6,11 +6,11 @@
#include "postinglisttraits.h"
#include "postingstore.h"
#include "ipostinglistsearchcontext.h"
+#include "posting_list_merger.h"
#include <vespa/searchcommon/attribute/search_context_params.h>
#include <vespa/searchcommon/common/range.h>
#include <vespa/vespalib/util/regexp.h>
#include <regex>
-#include "posting_list_merger.h"
namespace search::attribute {
@@ -337,8 +337,7 @@ getIterators(bool shouldApplyRangeLimit)
bool isFloat =
_toBeSearched.getBasicType() == BasicType::FLOAT ||
_toBeSearched.getBasicType() == BasicType::DOUBLE;
- bool isUnsigned = _toBeSearched.getInternalBasicType().isUnsigned();
- search::Range<BaseType> capped = this->template cappedRange<BaseType>(isFloat, isUnsigned);
+ search::Range<BaseType> capped = this->template cappedRange<BaseType>(isFloat);
auto compLow = _enumStore.make_comparator(capped.lower());
auto compHigh = _enumStore.make_comparator(capped.upper());