summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-04-11 21:15:50 +0200
committerGitHub <noreply@github.com>2020-04-11 21:15:50 +0200
commit6e1f4fafb75ad96914e006b5a779c82549e88ca7 (patch)
treeb04b8d9ac5791a67c641ff1ee15b7cc6417ccf93 /document
parentec5928b4043e96d081837f32adeaec96356e974e (diff)
parent0e42524451b070f4006ac26cef53d675cfd35686 (diff)
Merge pull request #12881 from vespa-engine/balder/ressurect-docstore-validation-rebased-2
Balder/ressurect docstore validation rebased 2
Diffstat (limited to 'document')
-rw-r--r--document/src/vespa/document/base/documentid.h2
-rw-r--r--document/src/vespa/document/fieldvalue/referencefieldvalue.cpp2
2 files changed, 2 insertions, 2 deletions
diff --git a/document/src/vespa/document/base/documentid.h b/document/src/vespa/document/base/documentid.h
index 5dcda838623..9da28f54b82 100644
--- a/document/src/vespa/document/base/documentid.h
+++ b/document/src/vespa/document/base/documentid.h
@@ -65,7 +65,7 @@ public:
const IdString& getScheme() const { return _id; }
bool hasDocType() const { return _id.hasDocType(); }
- vespalib::string getDocType() const { return _id.getDocType(); }
+ vespalib::stringref getDocType() const { return _id.getDocType(); }
const GlobalId& getGlobalId() const {
if (!_globalId.first) { calculateGlobalId(); }
diff --git a/document/src/vespa/document/fieldvalue/referencefieldvalue.cpp b/document/src/vespa/document/fieldvalue/referencefieldvalue.cpp
index 6c046c1787b..273038b1cf3 100644
--- a/document/src/vespa/document/fieldvalue/referencefieldvalue.cpp
+++ b/document/src/vespa/document/fieldvalue/referencefieldvalue.cpp
@@ -47,7 +47,7 @@ void ReferenceFieldValue::requireIdOfMatchingType(
make_string("Can't assign document ID '%s' (of type '%s') to "
"reference of document type '%s'",
id.toString().c_str(),
- id.getDocType().c_str(),
+ vespalib::string(id.getDocType()).c_str(),
type.getName().c_str()),
VESPA_STRLOC);
}