diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-15 10:15:28 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2022-03-15 10:15:28 +0000 |
commit | 39f64445921f49fb1e0cc5a4144a8ce0ee65fcd5 (patch) | |
tree | b25a52f172c13c17933ce8ff6b1411ab5c695d16 /document | |
parent | 38a32e3e4af6d2b6a7ea68a4bb490352e9d64be0 (diff) |
GC unused convenience methods.
Diffstat (limited to 'document')
-rw-r--r-- | document/src/tests/annotation/annotation_test.cpp | 3 | ||||
-rw-r--r-- | document/src/vespa/document/fieldvalue/fieldvalue.cpp | 6 | ||||
-rw-r--r-- | document/src/vespa/document/fieldvalue/fieldvalue.h | 7 |
3 files changed, 2 insertions, 14 deletions
diff --git a/document/src/tests/annotation/annotation_test.cpp b/document/src/tests/annotation/annotation_test.cpp index 1e4e216cdc6..2700cfcf96f 100644 --- a/document/src/tests/annotation/annotation_test.cpp +++ b/document/src/tests/annotation/annotation_test.cpp @@ -154,7 +154,7 @@ TEST("requireThatAnnotationsCanHaveValues") { } TEST("requireThatAnnotationsCanReferenceAnnotations") { - SpanList::UP root(new SpanList); + auto root = std::make_unique<SpanList>(); SpanTree tree("html", std::move(root)); size_t san_index = tree.annotate(makeUP(new Annotation(text_type))); size_t fran_index = tree.annotate(makeUP(new Annotation(text_type))); @@ -174,7 +174,6 @@ TEST("requireThatAnnotationsCanReferenceAnnotations") { Annotation city(city_type, std::move(city_data)); ASSERT_TRUE(city.getFieldValue()); - EXPECT_TRUE(city.getFieldValue()->isA(original)); EXPECT_EQUAL(original, *city.getFieldValue()); } diff --git a/document/src/vespa/document/fieldvalue/fieldvalue.cpp b/document/src/vespa/document/fieldvalue/fieldvalue.cpp index c69b7169aa0..cc55775d54c 100644 --- a/document/src/vespa/document/fieldvalue/fieldvalue.cpp +++ b/document/src/vespa/document/fieldvalue/fieldvalue.cpp @@ -48,10 +48,6 @@ FieldValue::hash() const return vespalib::hashValue(os.data(), os.size()) ; } -bool -FieldValue::isA(const FieldValue& other) const { - return (getDataType()->isA(*other.getDataType())); -} int FieldValue::compare(const FieldValue& other) const { return getDataType()->cmpId(*other.getDataType()); @@ -216,7 +212,7 @@ FieldValue::createArray(const DataType & baseType) } std::ostream& operator<<(std::ostream& out, const FieldValue & p) { - p.print(out); + p.print(out, false, ""); return out; } diff --git a/document/src/vespa/document/fieldvalue/fieldvalue.h b/document/src/vespa/document/fieldvalue/fieldvalue.h index fedb0141391..5eadb3307b5 100644 --- a/document/src/vespa/document/fieldvalue/fieldvalue.h +++ b/document/src/vespa/document/fieldvalue/fieldvalue.h @@ -65,9 +65,6 @@ public: /** Get the datatype describing what can be stored in this fieldvalue. */ virtual const DataType *getDataType() const = 0; - /** Wrapper for datatypes isA() function. See DataType. */ - virtual bool isA(const FieldValue& other) const; - void serialize(vespalib::nbostream &stream) const; vespalib::nbostream serialize() const; @@ -171,10 +168,6 @@ public: } virtual void print(std::ostream& out, bool verbose, const std::string& indent) const = 0; - // Duplication to reduce size of FieldValue - void print(std::ostream& out) const { print(out, false, ""); } - void print(std::ostream& out, bool verbose) const { print(out, verbose, ""); } - void print(std::ostream& out, const std::string& indent) const { print(out, false, indent); } /** Utility function to get this output as a string. */ std::string toString(bool verbose=false, const std::string& indent="") const; virtual void printXml(XmlOutputStream& out) const = 0; |