From 296de4ae6d4da3106a2883a76f723786177f6a87 Mon Sep 17 00:00:00 2001 From: Dmitri Smirnov Date: Fri, 10 Jul 2015 15:20:58 -0700 Subject: [PATCH] Address review comments Rule of five: add destructor Add a note to COMMIT.md for 3rd party json. --- include/rocksdb/transaction_log.h | 6 ++++++ third-party/fbson/COMMIT.md | 3 +++ 2 files changed, 9 insertions(+) diff --git a/include/rocksdb/transaction_log.h b/include/rocksdb/transaction_log.h index 33d1d6abe..e03a69eb0 100644 --- a/include/rocksdb/transaction_log.h +++ b/include/rocksdb/transaction_log.h @@ -59,9 +59,15 @@ struct BatchResult { SequenceNumber sequence = 0; std::unique_ptr writeBatchPtr; + // Add empty __ctor and __dtor for the rule of five + // However, preserve the original semantics and prohibit copying + // as the unique_ptr member does not copy. BatchResult() { } + ~BatchResult() { + } + BatchResult(const BatchResult&) = delete; BatchResult& operator=(const BatchResult&) = delete; diff --git a/third-party/fbson/COMMIT.md b/third-party/fbson/COMMIT.md index bba88d57b..b38b5424d 100644 --- a/third-party/fbson/COMMIT.md +++ b/third-party/fbson/COMMIT.md @@ -1,2 +1,5 @@ fbson commit: https://github.com/facebook/mysql-5.6/commit/55ef9ff25c934659a70b4094e9b406c48e9dd43d + +# TODO. +* Had to convert zero sized array to [1] sized arrays due to the fact that MS Compiler complains about it not being standard. At some point need to contribute this change back to MySql where this code was taken from.