summaryrefslogtreecommitdiffstats
path: root/document
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2020-04-08 22:35:52 +0000
committerHenning Baldersheim <balder@yahoo-inc.com>2020-04-08 22:35:52 +0000
commitb971dbe48ad2111f24e7b953eaf351e9a0bb4ea1 (patch)
treed300b3d83395c6e89d395f00a7d34a772b616aee /document
parent78298d9906f214fc9e096df782bfb7ee5fa1e76d (diff)
Make RemoveOperation an interface and move implmentation to RemoveOperationWithDocId
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);
}