From 51204163dfaf7c5e26377d7523599c7de249412c Mon Sep 17 00:00:00 2001 From: "A.J. Beamon" Date: Wed, 20 Jul 2022 15:29:34 -0700 Subject: [PATCH] Some minor changes from code review --- fdbclient/Tuple.cpp | 3 ++- fdbclient/include/fdbclient/Tuple.h | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/fdbclient/Tuple.cpp b/fdbclient/Tuple.cpp index 8b8a0aebd0..d3c3416b88 100644 --- a/fdbclient/Tuple.cpp +++ b/fdbclient/Tuple.cpp @@ -462,6 +462,7 @@ TEST_CASE("fdbclient/Tuple/makeTuple") { ASSERT(t1.getType(5) == Tuple::UTF8); ASSERT(t1.getType(6) == Tuple::NULL_TYPE); ASSERT(t1.getType(7) == Tuple::VERSIONSTAMP); + ASSERT(t1.size() == 8); return Void(); -} \ No newline at end of file +} diff --git a/fdbclient/include/fdbclient/Tuple.h b/fdbclient/include/fdbclient/Tuple.h index f517f97341..4d933172af 100644 --- a/fdbclient/include/fdbclient/Tuple.h +++ b/fdbclient/include/fdbclient/Tuple.h @@ -30,7 +30,7 @@ struct Tuple { struct UnicodeStr { StringRef str; - UnicodeStr(StringRef str) : str(str) {} + explicit UnicodeStr(StringRef str) : str(str) {} }; Tuple() {} @@ -97,7 +97,7 @@ struct Tuple { // Use a fold expression to append each argument using the << operator. // https://en.cppreference.com/w/cpp/language/fold - (t << ... << args); + (t << ... << std::forward(args)); return t; }