diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-16 10:42:38 +0000 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2020-01-16 10:42:38 +0000 |
commit | 6b816198bd0d8a518465c8015e6dc9ee40399cd2 (patch) | |
tree | 17f93abf032e2ef2f4100131f3b1075db1a23a37 /persistence | |
parent | 7e0c1731e36eb7048977ad14d6457182fb5ec4c1 (diff) |
Just use the stream method.
Diffstat (limited to 'persistence')
-rw-r--r-- | persistence/src/vespa/persistence/conformancetest/conformancetest.cpp | 2 | ||||
-rw-r--r-- | persistence/src/vespa/persistence/spi/docentry.cpp | 22 |
2 files changed, 12 insertions, 12 deletions
diff --git a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp index 3ae13d6b21c..937431fb7dd 100644 --- a/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp +++ b/persistence/src/vespa/persistence/conformancetest/conformancetest.cpp @@ -405,7 +405,7 @@ TEST_F(ConformanceTest, testBasics) timeDoc2 = result.getEntries()[i]->getTimestamp(); } } else { - FAIL() << "Unknown document " << did->toString(); + FAIL() << "Unknown document " << *did; } } diff --git a/persistence/src/vespa/persistence/spi/docentry.cpp b/persistence/src/vespa/persistence/spi/docentry.cpp index 4c2707f3a5e..dac3761c6d2 100644 --- a/persistence/src/vespa/persistence/spi/docentry.cpp +++ b/persistence/src/vespa/persistence/spi/docentry.cpp @@ -90,9 +90,9 @@ DocEntry::toString() const std::ostringstream out; out << "DocEntry(" << _timestamp << ", " << _metaFlags << ", "; if (_documentId.get() != 0) { - out << _documentId->toString(); + out << *_documentId; } else if (_document.get()) { - out << "Doc(" << _document->getId().toString() << ")"; + out << "Doc(" << _document->getId() << ")"; } else { out << "metadata only"; } @@ -110,10 +110,10 @@ DocEntry::prettyPrint(std::ostream& out) const out << "DocEntry(Timestamp: " << _timestamp << ", size " << getPersistedDocumentSize() << ", "; - if (_documentId.get() != 0) { - out << _documentId->toString(); + if (_documentId) { + out << *_documentId; } else if (_document.get()) { - out << "Doc(" << _document->getId().toString() << ")"; + out << "Doc(" << _document->getId() << ")"; } else { out << "metadata only"; } @@ -135,8 +135,8 @@ DocEntry::operator==(const DocEntry& entry) const { return false; } - if (_documentId.get()) { - if (!entry._documentId.get()) { + if (_documentId) { + if (!entry._documentId) { return false; } @@ -144,13 +144,13 @@ DocEntry::operator==(const DocEntry& entry) const { return false; } } else { - if (entry._documentId.get()) { + if (entry._documentId) { return false; } } - if (_document.get()) { - if (!entry._document.get()) { + if (_document) { + if (!entry._document) { return false; } @@ -158,7 +158,7 @@ DocEntry::operator==(const DocEntry& entry) const { return false; } } else { - if (entry._document.get()) { + if (entry._document) { return false; } } |