diff options
4 files changed, 1 insertions, 31 deletions
diff --git a/document/src/tests/documenttestcase.cpp b/document/src/tests/documenttestcase.cpp index 6b33edef18d..76226129997 100644 --- a/document/src/tests/documenttestcase.cpp +++ b/document/src/tests/documenttestcase.cpp @@ -879,15 +879,6 @@ TEST(DocumentTest, testGenerateSerializedFile) } close(fd); - vespalib::nbostream bBuf; - doc.serializeBody(bBuf); - fd = open((serializedDir+ "/serializecppsplit_body.dat").c_str(), - O_WRONLY | O_TRUNC | O_CREAT, 0644); - if (write(fd, bBuf.peek(), bBuf.size()) != (ssize_t)bBuf.size()) { - throw vespalib::Exception("write failed"); - } - close(fd); - CompressionConfig newCfg(CompressionConfig::LZ4, 9, 95); const_cast<StructDataType &>(doc.getType().getFieldsType()).setCompressionConfig(newCfg); diff --git a/document/src/vespa/document/fieldvalue/document.cpp b/document/src/vespa/document/fieldvalue/document.cpp index 48059c7038d..969684f104b 100644 --- a/document/src/vespa/document/fieldvalue/document.cpp +++ b/document/src/vespa/document/fieldvalue/document.cpp @@ -213,25 +213,6 @@ void Document::serializeHeader(nbostream& stream) const { serializer.write(*this, WITHOUT_BODY); } -bool Document::hasBodyField() const { - for (document::StructuredFieldValue::const_iterator it(getFields().begin()), mt(getFields().end()); - it != mt; - ++it) - { - if ( ! it.field().isHeaderField() ) { - return true; - } - } - return false; -} - -void Document::serializeBody(nbostream& stream) const { - if (hasBodyField()) { - VespaDocumentSerializer serializer(stream); - serializer.write(_fields, BodyFields()); - } -} - void Document::deserialize(const DocumentTypeRepo& repo, vespalib::nbostream & os) { VespaDocumentDeserializer deserializer(repo, os, 0); try { diff --git a/document/src/vespa/document/fieldvalue/document.h b/document/src/vespa/document/fieldvalue/document.h index 6a111fe6782..f20ef969e0c 100644 --- a/document/src/vespa/document/fieldvalue/document.h +++ b/document/src/vespa/document/fieldvalue/document.h @@ -90,7 +90,6 @@ public: // Specialized serialization functions, Only used for testing legacy stuff void serializeHeader(vespalib::nbostream& stream) const; - void serializeBody(vespalib::nbostream& stream) const; void deserialize(const DocumentTypeRepo& repo, vespalib::nbostream & os); /** Deserialize document contained in given bytebuffers. */ @@ -110,7 +109,6 @@ public: private: void deserializeHeader(const DocumentTypeRepo& repo, vespalib::nbostream & header); void deserializeBody(const DocumentTypeRepo& repo, vespalib::nbostream & body); - bool hasBodyField() const; bool hasFieldValue(const Field& field) const override { return _fields.hasValue(field); } void removeFieldValue(const Field& field) override { _fields.remove(field); } FieldValue::UP getFieldValue(const Field& field) const override { return _fields.getValue(field); } diff --git a/document/src/vespa/document/fieldvalue/serializablearray.cpp b/document/src/vespa/document/fieldvalue/serializablearray.cpp index 61c99645d2f..e33bf7f412d 100644 --- a/document/src/vespa/document/fieldvalue/serializablearray.cpp +++ b/document/src/vespa/document/fieldvalue/serializablearray.cpp @@ -149,7 +149,7 @@ SerializableArray::get(int id) const } } else { // should we clear all or what? - } + }N return buf; } |