mirror of
https://github.com/scylladb/scylladb.git
synced 2026-05-12 19:02:12 +00:00
bytes: don't allocate NUL terminator
Since bytes is used to encapsulate blobs, not strings, there's no need for a NUL terminator. It will never be passed to a function that expects a C string. Message-Id: <20180401151009.14108-1-avi@scylladb.com>
This commit is contained in:
2
bytes.hh
2
bytes.hh
@@ -29,7 +29,7 @@
|
||||
#include <functional>
|
||||
#include "utils/mutable_view.hh"
|
||||
|
||||
using bytes = basic_sstring<int8_t, uint32_t, 31>;
|
||||
using bytes = basic_sstring<int8_t, uint32_t, 31, false>;
|
||||
using bytes_view = std::experimental::basic_string_view<int8_t>;
|
||||
using bytes_mutable_view = basic_mutable_view<bytes_view::value_type>;
|
||||
using bytes_opt = std::experimental::optional<bytes>;
|
||||
|
||||
Reference in New Issue
Block a user