diff options
author | mikhnenko <mikhnenko@yandex-team.com> | 2024-07-05 19:02:26 +0300 |
---|---|---|
committer | mikhnenko <mikhnenko@yandex-team.com> | 2024-07-05 19:24:42 +0300 |
commit | ada19b071f15ecd5d6784db9fd710f68bcccf310 (patch) | |
tree | 25d6f6aa81af3792bc27ed7f3df17db1eb7376d2 /contrib/libs | |
parent | 4f4448a2dd0c402029f9bd62fe7e78c07c91f89f (diff) | |
download | ydb-ada19b071f15ecd5d6784db9fd710f68bcccf310.tar.gz |
Allow ref count using instead of copying
23539e82b20a022827e32bd98a2ab2abac725fab
Diffstat (limited to 'contrib/libs')
-rw-r--r-- | contrib/libs/protobuf/src/google/protobuf/arenastring.cc | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/contrib/libs/protobuf/src/google/protobuf/arenastring.cc b/contrib/libs/protobuf/src/google/protobuf/arenastring.cc index bedee9446a..a818c253d0 100644 --- a/contrib/libs/protobuf/src/google/protobuf/arenastring.cc +++ b/contrib/libs/protobuf/src/google/protobuf/arenastring.cc @@ -98,7 +98,8 @@ class ScopedCheckPtrInvariants { // Creates a heap allocated TProtoStringType value. inline TaggedStringPtr CreateString(ConstStringParam value) { TaggedStringPtr res; - res.SetAllocated(new TProtoStringType(value.data(), value.length())); + // better than TProtoStringType(value.data(), value.length()) + res.SetAllocated(new TProtoStringType(value)); return res; } |