diff options
author | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-03-24 12:58:27 +0000 |
---|---|---|
committer | Tor Brede Vekterli <vekterli@yahooinc.com> | 2022-03-24 13:50:19 +0000 |
commit | 5560e8dee6b87f89a2324dd90b89c2c233ab32a2 (patch) | |
tree | 619f799baeeffcee5e2904f0346b97958eebee1e /storage | |
parent | d670aad5992c35f8b5e3bf9e6666319eccd93ed3 (diff) |
Use vespalib::string in TestAndSetCondition
Avoids some implicit conversions. Add `starts_with` to `vespalib::string`
and `vespalib::stringref` to allow drop-in replacement for Document API code.
Diffstat (limited to 'storage')
-rw-r--r-- | storage/src/vespa/storage/distributor/externaloperationhandler.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp index 90906e2bdf1..3f3924df229 100644 --- a/storage/src/vespa/storage/distributor/externaloperationhandler.cpp +++ b/storage/src/vespa/storage/distributor/externaloperationhandler.cpp @@ -282,7 +282,7 @@ bool put_is_from_reindexing_visitor(const api::PutCommand& cmd) { // Precondition: put_is_from_reindexing_visitor(cmd) == true std::string extract_reindexing_token(const api::PutCommand& cmd) { - const std::string& tas_str = cmd.getCondition().getSelection(); + const auto& tas_str = cmd.getCondition().getSelection(); auto eq_idx = tas_str.find_first_of('='); if (eq_idx != std::string::npos) { return tas_str.substr(eq_idx + 1); |