We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e0c093b commit c1f393fCopy full SHA for c1f393f
2 files changed
src/common/bytes_utils.h
@@ -403,10 +403,5 @@ inline std::vector<uint8_t> StringToBytes(const std::string& str) {
403
}
404
405
inline std::string BytesToString(tcb::span<const uint8_t> span) {
406
- std::string result;
407
- result.reserve(span.size());
408
- for (const uint8_t byte : span) {
409
- result += static_cast<char>(byte);
410
- }
411
- return result;
+ return std::string(reinterpret_cast<const char*>(span.data()), span.size());
412
src/processing/typed_buffer_codecs.h
@@ -27,6 +27,8 @@
27
28
namespace dbps::processing {
29
30
+// The values in Int96 of low/mid/hi are stored in little endian order.
31
+// The order of low/mid/hi in the C++ struct should be kept, otherwise the codec will yield incorrect values.
32
struct Int96 {
33
int32_t lo;
34
int32_t mid;
0 commit comments