kudu-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From danburk...@apache.org
Subject [2/4] incubator-kudu git commit: Convert from pass-by-reference with copy to pass-by-value
Date Wed, 20 Jan 2016 00:35:37 GMT
http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/fs/block_manager_util.h
----------------------------------------------------------------------
diff --git a/src/kudu/fs/block_manager_util.h b/src/kudu/fs/block_manager_util.h
index ace5fef..e1136b7 100644
--- a/src/kudu/fs/block_manager_util.h
+++ b/src/kudu/fs/block_manager_util.h
@@ -38,9 +38,8 @@ namespace fs {
 class PathInstanceMetadataFile {
  public:
   // 'env' must remain valid for the lifetime of this class.
-  PathInstanceMetadataFile(Env* env,
-                           const std::string& block_manager_type,
-                           const std::string& filename);
+  PathInstanceMetadataFile(Env* env, std::string block_manager_type,
+                           std::string filename);
 
   ~PathInstanceMetadataFile();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/fs/file_block_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/file_block_manager.cc b/src/kudu/fs/file_block_manager.cc
index 9f71a75..677a9af 100644
--- a/src/kudu/fs/file_block_manager.cc
+++ b/src/kudu/fs/file_block_manager.cc
@@ -113,11 +113,8 @@ class FileBlockLocation {
   const BlockId& block_id() const { return block_id_; }
 
  private:
-  FileBlockLocation(const string& root_path,
-                    const BlockId& block_id)
-    : root_path_(root_path),
-      block_id_(block_id) {
-  }
+  FileBlockLocation(string root_path, BlockId block_id)
+      : root_path_(std::move(root_path)), block_id_(std::move(block_id)) {}
 
   // These per-byte accessors yield subdirectories in which blocks are grouped.
   string byte2() const {
@@ -215,9 +212,8 @@ void FileBlockLocation::GetAllParentDirs(vector<string>* parent_dirs) const {
 // FileWritableBlock instances is expected to be low.
 class FileWritableBlock : public WritableBlock {
  public:
-  FileWritableBlock(FileBlockManager* block_manager,
-                    const FileBlockLocation& location,
-                    const shared_ptr<WritableFile>& writer);
+  FileWritableBlock(FileBlockManager* block_manager, FileBlockLocation location,
+                    shared_ptr<WritableFile> writer);
 
   virtual ~FileWritableBlock();
 
@@ -266,13 +262,13 @@ class FileWritableBlock : public WritableBlock {
 };
 
 FileWritableBlock::FileWritableBlock(FileBlockManager* block_manager,
-                                     const FileBlockLocation& location,
-                                     const shared_ptr<WritableFile>& writer) :
-  block_manager_(block_manager),
-  location_(location),
-  writer_(writer),
-  state_(CLEAN),
-  bytes_appended_(0) {
+                                     FileBlockLocation location,
+                                     shared_ptr<WritableFile> writer)
+    : block_manager_(block_manager),
+      location_(std::move(location)),
+      writer_(std::move(writer)),
+      state_(CLEAN),
+      bytes_appended_(0) {
   if (block_manager_->metrics_) {
     block_manager_->metrics_->blocks_open_writing->Increment();
     block_manager_->metrics_->total_writable_blocks->Increment();
@@ -376,9 +372,8 @@ Status FileWritableBlock::Close(SyncMode mode) {
 // embed a FileBlockLocation, using the simpler BlockId instead.
 class FileReadableBlock : public ReadableBlock {
  public:
-  FileReadableBlock(const FileBlockManager* block_manager,
-                    const BlockId& block_id,
-                    const shared_ptr<RandomAccessFile>& reader);
+  FileReadableBlock(const FileBlockManager* block_manager, BlockId block_id,
+                    shared_ptr<RandomAccessFile> reader);
 
   virtual ~FileReadableBlock();
 
@@ -411,12 +406,12 @@ class FileReadableBlock : public ReadableBlock {
 };
 
 FileReadableBlock::FileReadableBlock(const FileBlockManager* block_manager,
-                                     const BlockId& block_id,
-                                     const shared_ptr<RandomAccessFile>& reader) :
-  block_manager_(block_manager),
-  block_id_(block_id),
-  reader_(reader),
-  closed_(false) {
+                                     BlockId block_id,
+                                     shared_ptr<RandomAccessFile> reader)
+    : block_manager_(block_manager),
+      block_id_(std::move(block_id)),
+      reader_(std::move(reader)),
+      closed_(false) {
   if (block_manager_->metrics_) {
     block_manager_->metrics_->blocks_open_reading->Increment();
     block_manager_->metrics_->total_readable_blocks->Increment();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/fs/log_block_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/fs/log_block_manager.cc b/src/kudu/fs/log_block_manager.cc
index 61f2c2e..3f48aa2 100644
--- a/src/kudu/fs/log_block_manager.cc
+++ b/src/kudu/fs/log_block_manager.cc
@@ -268,8 +268,7 @@ class LogBlockContainer {
   };
 
   LogBlockContainer(LogBlockManager* block_manager,
-                    PathInstanceMetadataPB* instance,
-                    const std::string& path,
+                    PathInstanceMetadataPB* instance, std::string path,
                     gscoped_ptr<WritablePBContainerFile> metadata_writer,
                     gscoped_ptr<RWFile> data_file);
 
@@ -309,19 +308,17 @@ class LogBlockContainer {
 const std::string LogBlockContainer::kMetadataFileSuffix(".metadata");
 const std::string LogBlockContainer::kDataFileSuffix(".data");
 
-LogBlockContainer::LogBlockContainer(LogBlockManager* block_manager,
-                                     PathInstanceMetadataPB* instance,
-                                     const string& path,
-                                     gscoped_ptr<WritablePBContainerFile> metadata_writer,
-                                     gscoped_ptr<RWFile> data_file)
-  : block_manager_(block_manager),
-    path_(path),
-    metadata_pb_writer_(metadata_writer.Pass()),
-    data_file_(data_file.Pass()),
-    total_bytes_written_(0),
-    metrics_(block_manager->metrics()),
-    instance_(instance) {
-}
+LogBlockContainer::LogBlockContainer(
+    LogBlockManager* block_manager, PathInstanceMetadataPB* instance,
+    string path, gscoped_ptr<WritablePBContainerFile> metadata_writer,
+    gscoped_ptr<RWFile> data_file)
+    : block_manager_(block_manager),
+      path_(std::move(path)),
+      metadata_pb_writer_(metadata_writer.Pass()),
+      data_file_(data_file.Pass()),
+      total_bytes_written_(0),
+      metrics_(block_manager->metrics()),
+      instance_(instance) {}
 
 Status LogBlockContainer::Create(LogBlockManager* block_manager,
                                  PathInstanceMetadataPB* instance,
@@ -606,8 +603,8 @@ void LogBlockContainer::ExecClosure(const Closure& task) {
 // the simpler RefCounted).
 class LogBlock : public RefCountedThreadSafe<LogBlock> {
  public:
-  LogBlock(LogBlockContainer* container, const BlockId& block_id,
-           int64_t offset, int64_t length);
+  LogBlock(LogBlockContainer* container, BlockId block_id, int64_t offset,
+           int64_t length);
   ~LogBlock();
 
   const BlockId& block_id() const { return block_id_; }
@@ -638,14 +635,13 @@ class LogBlock : public RefCountedThreadSafe<LogBlock> {
   DISALLOW_COPY_AND_ASSIGN(LogBlock);
 };
 
-LogBlock::LogBlock(LogBlockContainer* container,
-                   const BlockId& block_id,
+LogBlock::LogBlock(LogBlockContainer* container, BlockId block_id,
                    int64_t offset, int64_t length)
-  : container_(container),
-    block_id_(block_id),
-    offset_(offset),
-    length_(length),
-    deleted_(false) {
+    : container_(container),
+      block_id_(std::move(block_id)),
+      offset_(offset),
+      length_(length),
+      deleted_(false) {
   DCHECK_GE(offset, 0);
   DCHECK_GE(length, 0);
 
@@ -692,7 +688,7 @@ class LogWritableBlock : public WritableBlock {
     NO_SYNC
   };
 
-  LogWritableBlock(LogBlockContainer* container, const BlockId& block_id,
+  LogWritableBlock(LogBlockContainer* container, BlockId block_id,
                    int64_t block_offset);
 
   virtual ~LogWritableBlock();
@@ -762,13 +758,12 @@ class LogWritableBlock : public WritableBlock {
 };
 
 LogWritableBlock::LogWritableBlock(LogBlockContainer* container,
-                                   const BlockId& block_id,
-                                   int64_t block_offset)
-  : container_(container),
-    block_id_(block_id),
-    block_offset_(block_offset),
-    block_length_(0),
-    state_(CLEAN) {
+                                   BlockId block_id, int64_t block_offset)
+    : container_(container),
+      block_id_(std::move(block_id)),
+      block_offset_(block_offset),
+      block_length_(0),
+      state_(CLEAN) {
   DCHECK_GE(block_offset, 0);
   DCHECK_EQ(0, block_offset % container->instance()->filesystem_block_size_bytes());
   if (container->metrics()) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/bind_internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/bind_internal.h b/src/kudu/gutil/bind_internal.h
index 35f7ab1..6764d7e 100644
--- a/src/kudu/gutil/bind_internal.h
+++ b/src/kudu/gutil/bind_internal.h
@@ -2436,9 +2436,7 @@ struct BindState<Runnable, RunType, void()> : public BindStateBase {
 
   typedef Invoker<0, BindState, RunType> InvokerType;
   typedef typename InvokerType::UnboundRunType UnboundRunType;
-  explicit BindState(const Runnable& runnable)
-      : runnable_(runnable) {
-  }
+  explicit BindState(Runnable runnable) : runnable_(std::move(runnable)) {}
 
   virtual ~BindState() {  }
 
@@ -2457,9 +2455,8 @@ struct BindState<Runnable, RunType, void(P1)> : public BindStateBase {
   // Convenience typedefs for bound argument types.
   typedef UnwrapTraits<P1> Bound1UnwrapTraits;
 
-  BindState(const Runnable& runnable, const P1& p1)
-      : runnable_(runnable),
-        p1_(p1) {
+  BindState(Runnable runnable, P1 p1)
+      : runnable_(std::move(runnable)), p1_(std::move(p1)) {
     MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
   }
 
@@ -2483,10 +2480,8 @@ struct BindState<Runnable, RunType, void(P1, P2)> : public BindStateBase {
   typedef UnwrapTraits<P1> Bound1UnwrapTraits;
   typedef UnwrapTraits<P2> Bound2UnwrapTraits;
 
-  BindState(const Runnable& runnable, const P1& p1, const P2& p2)
-      : runnable_(runnable),
-        p1_(p1),
-        p2_(p2) {
+  BindState(Runnable runnable, P1 p1, P2 p2)
+      : runnable_(std::move(runnable)), p1_(std::move(p1)), p2_(std::move(p2)) {
     MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
   }
 
@@ -2513,11 +2508,11 @@ struct BindState<Runnable, RunType, void(P1, P2, P3)> : public BindStateBase {
   typedef UnwrapTraits<P2> Bound2UnwrapTraits;
   typedef UnwrapTraits<P3> Bound3UnwrapTraits;
 
-  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3)
-      : runnable_(runnable),
-        p1_(p1),
-        p2_(p2),
-        p3_(p3) {
+  BindState(Runnable runnable, P1 p1, P2 p2, P3 p3)
+      : runnable_(std::move(runnable)),
+        p1_(std::move(p1)),
+        p2_(std::move(p2)),
+        p3_(std::move(p3)) {
     MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
   }
 
@@ -2547,13 +2542,12 @@ struct BindState<Runnable, RunType, void(P1, P2, P3,
   typedef UnwrapTraits<P3> Bound3UnwrapTraits;
   typedef UnwrapTraits<P4> Bound4UnwrapTraits;
 
-  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
-      const P4& p4)
-      : runnable_(runnable),
-        p1_(p1),
-        p2_(p2),
+  BindState(Runnable runnable, P1 p1, P2 p2, const P3& p3, P4 p4)
+      : runnable_(std::move(runnable)),
+        p1_(std::move(p1)),
+        p2_(std::move(p2)),
         p3_(p3),
-        p4_(p4) {
+        p4_(std::move(p4)) {
     MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
   }
 
@@ -2585,14 +2579,13 @@ struct BindState<Runnable, RunType, void(P1, P2, P3, P4,
   typedef UnwrapTraits<P4> Bound4UnwrapTraits;
   typedef UnwrapTraits<P5> Bound5UnwrapTraits;
 
-  BindState(const Runnable& runnable, const P1& p1, const P2& p2, const P3& p3,
-      const P4& p4, const P5& p5)
-      : runnable_(runnable),
-        p1_(p1),
-        p2_(p2),
-        p3_(p3),
-        p4_(p4),
-        p5_(p5) {
+  BindState(Runnable runnable, P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
+      : runnable_(std::move(runnable)),
+        p1_(std::move(p1)),
+        p2_(std::move(p2)),
+        p3_(std::move(p3)),
+        p4_(std::move(p4)),
+        p5_(std::move(p5)) {
     MaybeRefcount<HasIsMethodTag<Runnable>::value, P1>::AddRef(p1_);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/gscoped_ptr.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/gscoped_ptr.h b/src/kudu/gutil/gscoped_ptr.h
index 8be8b10..cda7349 100644
--- a/src/kudu/gutil/gscoped_ptr.h
+++ b/src/kudu/gutil/gscoped_ptr.h
@@ -285,7 +285,7 @@ class gscoped_ptr_impl {
   // discussion of this technique.
   struct Data : public D {
     explicit Data(T* ptr_in) : ptr(ptr_in) {}
-    Data(T* ptr_in, const D& other) : D(other), ptr(ptr_in) {}
+    Data(T* ptr_in, D other) : D(std::move(other)), ptr(ptr_in) {}
     T* ptr;
   };
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/ref_counted_memory.cc
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/ref_counted_memory.cc b/src/kudu/gutil/ref_counted_memory.cc
index b24ae8b..9609c29 100644
--- a/src/kudu/gutil/ref_counted_memory.cc
+++ b/src/kudu/gutil/ref_counted_memory.cc
@@ -33,9 +33,8 @@ RefCountedStaticMemory::~RefCountedStaticMemory() {}
 
 RefCountedBytes::RefCountedBytes() {}
 
-RefCountedBytes::RefCountedBytes(const std::vector<unsigned char>& initializer)
-    : data_(initializer) {
-}
+RefCountedBytes::RefCountedBytes(std::vector<unsigned char> initializer)
+    : data_(std::move(initializer)) {}
 
 RefCountedBytes::RefCountedBytes(const unsigned char* p, size_t size)
     : data_(p, p + size) {}

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/ref_counted_memory.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/ref_counted_memory.h b/src/kudu/gutil/ref_counted_memory.h
index 610368c..550a142 100644
--- a/src/kudu/gutil/ref_counted_memory.h
+++ b/src/kudu/gutil/ref_counted_memory.h
@@ -74,7 +74,7 @@ class BASE_EXPORT RefCountedBytes : public RefCountedMemory {
   RefCountedBytes();
 
   // Constructs a RefCountedBytes object by _copying_ from |initializer|.
-  explicit RefCountedBytes(const std::vector<unsigned char>& initializer);
+  explicit RefCountedBytes(std::vector<unsigned char> initializer);
 
   // Constructs a RefCountedBytes object by copying |size| bytes from |p|.
   RefCountedBytes(const unsigned char* p, size_t size);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/strings/split.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split.h b/src/kudu/gutil/strings/split.h
index 2b6736a..d90b96b 100644
--- a/src/kudu/gutil/strings/split.h
+++ b/src/kudu/gutil/strings/split.h
@@ -401,7 +401,7 @@ template <typename Delimiter>
 class LimitImpl {
  public:
   LimitImpl(Delimiter delimiter, int limit)
-      : delimiter_(delimiter), limit_(limit), count_(0) {}
+      : delimiter_(std::move(delimiter)), limit_(limit), count_(0) {}
   StringPiece Find(StringPiece text) {
     if (count_++ == limit_) {
       return StringPiece(text.end(), 0);  // No more matches.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/strings/split_internal.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/split_internal.h b/src/kudu/gutil/strings/split_internal.h
index cc5b9e5..1b68554 100644
--- a/src/kudu/gutil/strings/split_internal.h
+++ b/src/kudu/gutil/strings/split_internal.h
@@ -72,16 +72,22 @@ class SplitIterator
  public:
   // Two constructors for "end" iterators.
   explicit SplitIterator(Delimiter d)
-      : delimiter_(d), predicate_(), is_end_(true) {}
+      : delimiter_(std::move(d)), predicate_(), is_end_(true) {}
   SplitIterator(Delimiter d, Predicate p)
-      : delimiter_(d), predicate_(p), is_end_(true) {}
+      : delimiter_(std::move(d)), predicate_(std::move(p)), is_end_(true) {}
   // Two constructors taking the text to iterator.
   SplitIterator(StringPiece text, Delimiter d)
-      : text_(text), delimiter_(d), predicate_(), is_end_(false) {
+      : text_(std::move(text)),
+        delimiter_(std::move(d)),
+        predicate_(),
+        is_end_(false) {
     ++(*this);
   }
   SplitIterator(StringPiece text, Delimiter d, Predicate p)
-      : text_(text), delimiter_(d), predicate_(p), is_end_(false) {
+      : text_(std::move(text)),
+        delimiter_(std::move(d)),
+        predicate_(std::move(p)),
+        is_end_(false) {
     ++(*this);
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/gutil/strings/strcat.h
----------------------------------------------------------------------
diff --git a/src/kudu/gutil/strings/strcat.h b/src/kudu/gutil/strings/strcat.h
index 9fee924..40b888b 100644
--- a/src/kudu/gutil/strings/strcat.h
+++ b/src/kudu/gutil/strings/strcat.h
@@ -62,7 +62,8 @@ struct AlphaNum {
     : piece(digits, strlen(DoubleToBuffer(f, digits))) {}
 
   AlphaNum(const char *c_str) : piece(c_str) {}  // NOLINT(runtime/explicit)
-  AlphaNum(const StringPiece &pc) : piece(pc) {}  // NOLINT(runtime/explicit)
+  AlphaNum(StringPiece pc)
+      : piece(std::move(pc)) {}            // NOLINT(runtime/explicit)
   AlphaNum(const string &s) : piece(s) {}  // NOLINT(runtime/explicit)
 
   StringPiece::size_type size() const { return piece.size(); }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/integration-tests/alter_table-randomized-test.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/alter_table-randomized-test.cc b/src/kudu/integration-tests/alter_table-randomized-test.cc
index b272b8d..1170482 100644
--- a/src/kudu/integration-tests/alter_table-randomized-test.cc
+++ b/src/kudu/integration-tests/alter_table-randomized-test.cc
@@ -223,9 +223,8 @@ struct TableState {
 };
 
 struct MirrorTable {
-  explicit MirrorTable(const shared_ptr<KuduClient>& client)
-    : client_(client) {
-  }
+  explicit MirrorTable(shared_ptr<KuduClient> client)
+      : client_(std::move(client)) {}
 
   Status Create() {
     KuduSchema schema;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/integration-tests/external_mini_cluster.cc
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.cc b/src/kudu/integration-tests/external_mini_cluster.cc
index 6c9de1a..2f15edb 100644
--- a/src/kudu/integration-tests/external_mini_cluster.cc
+++ b/src/kudu/integration-tests/external_mini_cluster.cc
@@ -491,15 +491,13 @@ Status ExternalMiniCluster::SetFlag(ExternalDaemon* daemon,
 // ExternalDaemon
 //------------------------------------------------------------
 
-ExternalDaemon::ExternalDaemon(const std::shared_ptr<rpc::Messenger>& messenger,
-                               const string& exe,
-                               const string& data_dir,
-                               const vector<string>& extra_flags) :
-  messenger_(messenger),
-  exe_(exe),
-  data_dir_(data_dir),
-  extra_flags_(extra_flags) {
-}
+ExternalDaemon::ExternalDaemon(std::shared_ptr<rpc::Messenger> messenger,
+                               string exe, string data_dir,
+                               vector<string> extra_flags)
+    : messenger_(std::move(messenger)),
+      exe_(std::move(exe)),
+      data_dir_(std::move(data_dir)),
+      extra_flags_(std::move(extra_flags)) {}
 
 ExternalDaemon::~ExternalDaemon() {
 }
@@ -782,13 +780,11 @@ ExternalMaster::ExternalMaster(const std::shared_ptr<rpc::Messenger>& messenger,
 }
 
 ExternalMaster::ExternalMaster(const std::shared_ptr<rpc::Messenger>& messenger,
-                               const string& exe,
-                               const string& data_dir,
-                               const string& rpc_bind_address,
+                               const string& exe, const string& data_dir,
+                               string rpc_bind_address,
                                const std::vector<string>& extra_flags)
     : ExternalDaemon(messenger, exe, data_dir, extra_flags),
-      rpc_bind_address_(rpc_bind_address) {
-}
+      rpc_bind_address_(std::move(rpc_bind_address)) {}
 
 ExternalMaster::~ExternalMaster() {
 }
@@ -824,16 +820,13 @@ Status ExternalMaster::Restart() {
 // ExternalTabletServer
 //------------------------------------------------------------
 
-ExternalTabletServer::ExternalTabletServer(const std::shared_ptr<rpc::Messenger>& messenger,
-                                           const string& exe,
-                                           const string& data_dir,
-                                           const string& bind_host,
-                                           const vector<HostPort>& master_addrs,
-                                           const vector<string>& extra_flags)
-  : ExternalDaemon(messenger, exe, data_dir, extra_flags),
-    master_addrs_(HostPort::ToCommaSeparatedString(master_addrs)),
-    bind_host_(bind_host) {
-}
+ExternalTabletServer::ExternalTabletServer(
+    const std::shared_ptr<rpc::Messenger>& messenger, const string& exe,
+    const string& data_dir, string bind_host,
+    const vector<HostPort>& master_addrs, const vector<string>& extra_flags)
+    : ExternalDaemon(messenger, exe, data_dir, extra_flags),
+      master_addrs_(HostPort::ToCommaSeparatedString(master_addrs)),
+      bind_host_(std::move(bind_host)) {}
 
 ExternalTabletServer::~ExternalTabletServer() {
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/integration-tests/external_mini_cluster.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/external_mini_cluster.h b/src/kudu/integration-tests/external_mini_cluster.h
index f03a61e..e4bfadf 100644
--- a/src/kudu/integration-tests/external_mini_cluster.h
+++ b/src/kudu/integration-tests/external_mini_cluster.h
@@ -281,9 +281,8 @@ class ExternalMiniCluster {
 
 class ExternalDaemon : public RefCountedThreadSafe<ExternalDaemon> {
  public:
-  ExternalDaemon(const std::shared_ptr<rpc::Messenger>& messenger,
-                 const std::string& exe, const std::string& data_dir,
-                 const std::vector<std::string>& extra_flags);
+  ExternalDaemon(std::shared_ptr<rpc::Messenger> messenger, std::string exe,
+                 std::string data_dir, std::vector<std::string> extra_flags);
 
   HostPort bound_rpc_hostport() const;
   Sockaddr bound_rpc_addr() const;
@@ -385,7 +384,7 @@ class ExternalMaster : public ExternalDaemon {
 
   ExternalMaster(const std::shared_ptr<rpc::Messenger>& messenger,
                  const std::string& exe, const std::string& data_dir,
-                 const std::string& rpc_bind_address,
+                 std::string rpc_bind_address,
                  const std::vector<std::string>& extra_flags);
 
   Status Start();
@@ -406,7 +405,7 @@ class ExternalTabletServer : public ExternalDaemon {
  public:
   ExternalTabletServer(const std::shared_ptr<rpc::Messenger>& messenger,
                        const std::string& exe, const std::string& data_dir,
-                       const std::string& bind_host,
+                       std::string bind_host,
                        const std::vector<HostPort>& master_addrs,
                        const std::vector<std::string>& extra_flags);
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/integration-tests/linked_list-test-util.h
----------------------------------------------------------------------
diff --git a/src/kudu/integration-tests/linked_list-test-util.h b/src/kudu/integration-tests/linked_list-test-util.h
index 0536e6f..1549919 100644
--- a/src/kudu/integration-tests/linked_list-test-util.h
+++ b/src/kudu/integration-tests/linked_list-test-util.h
@@ -59,21 +59,18 @@ typedef vector<pair<uint64_t, int64_t> > SnapsAndCounts;
 // facilitates checking for data integrity.
 class LinkedListTester {
  public:
-  LinkedListTester(const client::sp::shared_ptr<client::KuduClient>& client,
-                   const std::string& table_name,
-                   int num_chains,
-                   int num_tablets,
-                   int num_replicas,
-                   bool enable_mutation)
-    : verify_projection_({ kKeyColumnName, kLinkColumnName, kUpdatedColumnName }),
-      table_name_(table_name),
-      num_chains_(num_chains),
-      num_tablets_(num_tablets),
-      num_replicas_(num_replicas),
-      enable_mutation_(enable_mutation),
-      latency_histogram_(1000000, 3),
-      client_(client) {
-
+  LinkedListTester(client::sp::shared_ptr<client::KuduClient> client,
+                   std::string table_name, int num_chains, int num_tablets,
+                   int num_replicas, bool enable_mutation)
+      : verify_projection_(
+            {kKeyColumnName, kLinkColumnName, kUpdatedColumnName}),
+        table_name_(std::move(table_name)),
+        num_chains_(num_chains),
+        num_tablets_(num_tablets),
+        num_replicas_(num_replicas),
+        enable_mutation_(enable_mutation),
+        latency_histogram_(1000000, 3),
+        client_(std::move(client)) {
     client::KuduSchemaBuilder b;
 
     b.AddColumn(kKeyColumnName)->Type(client::KuduColumnSchema::INT64)->NotNull()->PrimaryKey();
@@ -281,12 +278,9 @@ class ScopedRowUpdater {
 // linked list test.
 class PeriodicWebUIChecker {
  public:
-
   PeriodicWebUIChecker(const ExternalMiniCluster& cluster,
-                       const std::string& tablet_id,
-                       const MonoDelta& period)
-    : period_(period),
-      is_running_(true) {
+                       const std::string& tablet_id, MonoDelta period)
+      : period_(std::move(period)), is_running_(true) {
     // List of master and ts web pages to fetch
     vector<std::string> master_pages, ts_pages;
 
@@ -367,7 +361,7 @@ class PeriodicWebUIChecker {
 class LinkedListVerifier {
  public:
   LinkedListVerifier(int num_chains, bool enable_mutation, int64_t expected,
-                     const std::vector<int64_t>& split_key_ints);
+                     std::vector<int64_t> split_key_ints);
 
   // Start the scan timer. The duration between starting the scan and verifying
   // the data is logged in the VerifyData() step, so this should be called
@@ -763,13 +757,14 @@ Status LinkedListTester::WaitAndVerify(int seconds_to_run,
 // LinkedListVerifier
 /////////////////////////////////////////////////////////////
 
-LinkedListVerifier::LinkedListVerifier(int num_chains, bool enable_mutation, int64_t expected,
-                                       const std::vector<int64_t>& split_key_ints)
-  : num_chains_(num_chains),
-    expected_(expected),
-    enable_mutation_(enable_mutation),
-    split_key_ints_(split_key_ints),
-    errors_(0) {
+LinkedListVerifier::LinkedListVerifier(int num_chains, bool enable_mutation,
+                                       int64_t expected,
+                                       std::vector<int64_t> split_key_ints)
+    : num_chains_(num_chains),
+      expected_(expected),
+      enable_mutation_(enable_mutation),
+      split_key_ints_(std::move(split_key_ints)),
+      errors_(0) {
   if (expected != kNoParticularCountExpected) {
     DCHECK_GE(expected, 0);
     seen_key_.reserve(expected);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/catalog_manager.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.cc b/src/kudu/master/catalog_manager.cc
index 729fe4b..d935d63 100644
--- a/src/kudu/master/catalog_manager.cc
+++ b/src/kudu/master/catalog_manager.cc
@@ -1722,10 +1722,8 @@ class TSPicker {
 // identified by its UUID.
 class PickSpecificUUID : public TSPicker {
  public:
-  PickSpecificUUID(Master* master, const string& ts_uuid) :
-    master_(master),
-    ts_uuid_(ts_uuid) {
-  }
+  PickSpecificUUID(Master* master, string ts_uuid)
+      : master_(master), ts_uuid_(std::move(ts_uuid)) {}
 
   virtual Status PickReplica(TSDescriptor** ts_desc) OVERRIDE {
     shared_ptr<TSDescriptor> ts;
@@ -2080,20 +2078,18 @@ class AsyncCreateReplica : public RetrySpecificTSRpcTask {
 // Send a DeleteTablet() RPC request.
 class AsyncDeleteReplica : public RetrySpecificTSRpcTask {
  public:
-  AsyncDeleteReplica(Master *master,
-                     ThreadPool* callback_pool,
-                     const string& permanent_uuid,
-                     const scoped_refptr<TableInfo>& table,
-                     const std::string& tablet_id,
-                     TabletDataState delete_type,
-                     const boost::optional<int64_t>& cas_config_opid_index_less_or_equal,
-                     const string& reason)
-    : RetrySpecificTSRpcTask(master, callback_pool, permanent_uuid, table),
-      tablet_id_(tablet_id),
-      delete_type_(delete_type),
-      cas_config_opid_index_less_or_equal_(cas_config_opid_index_less_or_equal),
-      reason_(reason) {
-  }
+  AsyncDeleteReplica(
+      Master* master, ThreadPool* callback_pool, const string& permanent_uuid,
+      const scoped_refptr<TableInfo>& table, std::string tablet_id,
+      TabletDataState delete_type,
+      boost::optional<int64_t> cas_config_opid_index_less_or_equal,
+      string reason)
+      : RetrySpecificTSRpcTask(master, callback_pool, permanent_uuid, table),
+        tablet_id_(std::move(tablet_id)),
+        delete_type_(delete_type),
+        cas_config_opid_index_less_or_equal_(
+            std::move(cas_config_opid_index_less_or_equal)),
+        reason_(std::move(reason)) {}
 
   virtual string type_name() const OVERRIDE { return "Delete Tablet"; }
 
@@ -3039,11 +3035,11 @@ std::string CatalogManager::LogPrefix() const {
 ////////////////////////////////////////////////////////////
 
 TabletInfo::TabletInfo(const scoped_refptr<TableInfo>& table,
-                       const std::string& tablet_id)
-  : tablet_id_(tablet_id), table_(table),
-    last_update_time_(MonoTime::Now(MonoTime::FINE)),
-    reported_schema_version_(0) {
-}
+                       std::string tablet_id)
+    : tablet_id_(std::move(tablet_id)),
+      table_(table),
+      last_update_time_(MonoTime::Now(MonoTime::FINE)),
+      reported_schema_version_(0) {}
 
 TabletInfo::~TabletInfo() {
 }
@@ -3102,9 +3098,7 @@ void PersistentTabletInfo::set_state(SysTabletsEntryPB::State state, const strin
 // TableInfo
 ////////////////////////////////////////////////////////////
 
-TableInfo::TableInfo(const std::string& table_id)
-  : table_id_(table_id) {
-}
+TableInfo::TableInfo(std::string table_id) : table_id_(std::move(table_id)) {}
 
 TableInfo::~TableInfo() {
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/catalog_manager.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/catalog_manager.h b/src/kudu/master/catalog_manager.h
index f6c7db0..55d918e 100644
--- a/src/kudu/master/catalog_manager.h
+++ b/src/kudu/master/catalog_manager.h
@@ -109,7 +109,7 @@ class TabletInfo : public RefCountedThreadSafe<TabletInfo> {
   typedef PersistentTabletInfo cow_state;
   typedef std::unordered_map<std::string, TabletReplica> ReplicaMap;
 
-  TabletInfo(const scoped_refptr<TableInfo>& table, const std::string& tablet_id);
+  TabletInfo(const scoped_refptr<TableInfo>& table, std::string tablet_id);
 
   const std::string& tablet_id() const { return tablet_id_; }
   const scoped_refptr<TableInfo>& table() const { return table_; }
@@ -202,7 +202,7 @@ class TableInfo : public RefCountedThreadSafe<TableInfo> {
  public:
   typedef PersistentTableInfo cow_state;
 
-  explicit TableInfo(const std::string& table_id);
+  explicit TableInfo(std::string table_id);
 
   std::string ToString() const;
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/master_rpc.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/master_rpc.cc b/src/kudu/master/master_rpc.cc
index 8e71608..60290a8 100644
--- a/src/kudu/master/master_rpc.cc
+++ b/src/kudu/master/master_rpc.cc
@@ -45,16 +45,13 @@ namespace master {
 // GetMasterRegistrationRpc
 ////////////////////////////////////////////////////////////
 
-GetMasterRegistrationRpc::GetMasterRegistrationRpc(const StatusCallback& user_cb,
-                                                   const Sockaddr& addr,
-                                                   const MonoTime& deadline,
-                                                   const shared_ptr<Messenger>& messenger,
-                                                   ServerEntryPB* out)
+GetMasterRegistrationRpc::GetMasterRegistrationRpc(
+    StatusCallback user_cb, Sockaddr addr, const MonoTime& deadline,
+    const shared_ptr<Messenger>& messenger, ServerEntryPB* out)
     : Rpc(deadline, messenger),
-      user_cb_(user_cb),
-      addr_(addr),
-      out_(DCHECK_NOTNULL(out)) {
-}
+      user_cb_(std::move(user_cb)),
+      addr_(std::move(addr)),
+      out_(DCHECK_NOTNULL(out)) {}
 
 GetMasterRegistrationRpc::~GetMasterRegistrationRpc() {
 }
@@ -106,13 +103,13 @@ void GetMasterRegistrationRpc::SendRpcCb(const Status& status) {
 // GetLeaderMasterRpc
 ////////////////////////////////////////////////////////////
 
-GetLeaderMasterRpc::GetLeaderMasterRpc(const LeaderCallback& user_cb,
-                                       const vector<Sockaddr>& addrs,
+GetLeaderMasterRpc::GetLeaderMasterRpc(LeaderCallback user_cb,
+                                       vector<Sockaddr> addrs,
                                        const MonoTime& deadline,
                                        const shared_ptr<Messenger>& messenger)
     : Rpc(deadline, messenger),
-      user_cb_(user_cb),
-      addrs_(addrs),
+      user_cb_(std::move(user_cb)),
+      addrs_(std::move(addrs)),
       pending_responses_(0),
       completed_(false) {
   DCHECK(deadline.Initialized());

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/master_rpc.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/master_rpc.h b/src/kudu/master/master_rpc.h
index 6915afa..d7ffc5d 100644
--- a/src/kudu/master/master_rpc.h
+++ b/src/kudu/master/master_rpc.h
@@ -46,8 +46,7 @@ class GetMasterRegistrationRpc : public rpc::Rpc {
   // pointer for the lifetime of this object.
   //
   // Invokes 'user_cb' upon failure or success of the RPC call.
-  GetMasterRegistrationRpc(const StatusCallback& user_cb,
-                           const Sockaddr& addr,
+  GetMasterRegistrationRpc(StatusCallback user_cb, Sockaddr addr,
                            const MonoTime& deadline,
                            const std::shared_ptr<rpc::Messenger>& messenger,
                            ServerEntryPB* out);
@@ -97,8 +96,7 @@ class GetLeaderMasterRpc : public rpc::Rpc,
   //
   // Calls 'user_cb' when the leader is found, or if no leader can be
   // found until 'deadline' passes.
-  GetLeaderMasterRpc(const LeaderCallback& user_cb,
-                     const std::vector<Sockaddr>& addrs,
+  GetLeaderMasterRpc(LeaderCallback user_cb, std::vector<Sockaddr> addrs,
                      const MonoTime& deadline,
                      const std::shared_ptr<rpc::Messenger>& messenger);
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/mini_master.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/mini_master.cc b/src/kudu/master/mini_master.cc
index 7881135..2739d62 100644
--- a/src/kudu/master/mini_master.cc
+++ b/src/kudu/master/mini_master.cc
@@ -36,12 +36,11 @@ DECLARE_bool(rpc_server_allow_ephemeral_ports);
 namespace kudu {
 namespace master {
 
-MiniMaster::MiniMaster(Env* env, const string& fs_root, uint16_t rpc_port)
-  : running_(false),
-    env_(env),
-    fs_root_(fs_root),
-    rpc_port_(rpc_port) {
-}
+MiniMaster::MiniMaster(Env* env, string fs_root, uint16_t rpc_port)
+    : running_(false),
+      env_(env),
+      fs_root_(std::move(fs_root)),
+      rpc_port_(rpc_port) {}
 
 MiniMaster::~MiniMaster() {
   CHECK(!running_);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/mini_master.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/mini_master.h b/src/kudu/master/mini_master.h
index ead3b6b..3d1f801 100644
--- a/src/kudu/master/mini_master.h
+++ b/src/kudu/master/mini_master.h
@@ -41,7 +41,7 @@ struct MasterOptions;
 // having multiple Start methods.
 class MiniMaster {
  public:
-  MiniMaster(Env* env, const std::string& fs_root, uint16_t rpc_port);
+  MiniMaster(Env* env, std::string fs_root, uint16_t rpc_port);
   ~MiniMaster();
 
   // Start a master running on the loopback interface and

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/sys_catalog.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog.cc b/src/kudu/master/sys_catalog.cc
index c8b6d55..fb799e9 100644
--- a/src/kudu/master/sys_catalog.cc
+++ b/src/kudu/master/sys_catalog.cc
@@ -67,12 +67,11 @@ static const char* const kSysCatalogTableColType = "entry_type";
 static const char* const kSysCatalogTableColId = "entry_id";
 static const char* const kSysCatalogTableColMetadata = "metadata";
 
-SysCatalogTable::SysCatalogTable(Master* master,
-                                 MetricRegistry* metrics,
-                                 const ElectedLeaderCallback& leader_cb)
+SysCatalogTable::SysCatalogTable(Master* master, MetricRegistry* metrics,
+                                 ElectedLeaderCallback leader_cb)
     : metric_registry_(metrics),
       master_(master),
-      leader_cb_(leader_cb),
+      leader_cb_(std::move(leader_cb)),
       old_role_(RaftPeerPB::FOLLOWER) {
   CHECK_OK(ThreadPoolBuilder("apply").Build(&apply_pool_));
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/sys_catalog.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/sys_catalog.h b/src/kudu/master/sys_catalog.h
index a8dee84..a588082 100644
--- a/src/kudu/master/sys_catalog.h
+++ b/src/kudu/master/sys_catalog.h
@@ -79,9 +79,8 @@ class SysCatalogTable {
   // the consensus configuration's progress, any long running tasks (e.g., scanning
   // tablets) should be performed asynchronously (by, e.g., submitting
   // them to a to a separate threadpool).
-  SysCatalogTable(Master* master,
-                  MetricRegistry* metrics,
-                  const ElectedLeaderCallback& leader_cb);
+  SysCatalogTable(Master* master, MetricRegistry* metrics,
+                  ElectedLeaderCallback leader_cb);
 
   ~SysCatalogTable();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/ts_descriptor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/master/ts_descriptor.cc b/src/kudu/master/ts_descriptor.cc
index a4d315e..c29912c 100644
--- a/src/kudu/master/ts_descriptor.cc
+++ b/src/kudu/master/ts_descriptor.cc
@@ -42,12 +42,11 @@ Status TSDescriptor::RegisterNew(const NodeInstancePB& instance,
   return Status::OK();
 }
 
-TSDescriptor::TSDescriptor(const std::string& perm_id)
-  : permanent_uuid_(perm_id),
-    latest_seqno_(-1),
-    last_heartbeat_(MonoTime::Now(MonoTime::FINE)),
-    has_tablet_report_(false) {
-}
+TSDescriptor::TSDescriptor(std::string perm_id)
+    : permanent_uuid_(std::move(perm_id)),
+      latest_seqno_(-1),
+      last_heartbeat_(MonoTime::Now(MonoTime::FINE)),
+      has_tablet_report_(false) {}
 
 TSDescriptor::~TSDescriptor() {
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/master/ts_descriptor.h
----------------------------------------------------------------------
diff --git a/src/kudu/master/ts_descriptor.h b/src/kudu/master/ts_descriptor.h
index 683f1e6..792fe72 100644
--- a/src/kudu/master/ts_descriptor.h
+++ b/src/kudu/master/ts_descriptor.h
@@ -91,7 +91,7 @@ class TSDescriptor {
                            std::shared_ptr<consensus::ConsensusServiceProxy>* proxy);
 
  private:
-  explicit TSDescriptor(const std::string& perm_id);
+  explicit TSDescriptor(std::string perm_id);
 
   // Uses DNS to resolve registered hosts to a single Sockaddr.
   Status ResolveSockaddr(Sockaddr* addr) const;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/acceptor_pool.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/acceptor_pool.cc b/src/kudu/rpc/acceptor_pool.cc
index 6ceb7fe..f6a98be 100644
--- a/src/kudu/rpc/acceptor_pool.cc
+++ b/src/kudu/rpc/acceptor_pool.cc
@@ -56,15 +56,14 @@ TAG_FLAG(rpc_acceptor_listen_backlog, advanced);
 namespace kudu {
 namespace rpc {
 
-AcceptorPool::AcceptorPool(Messenger *messenger,
-                           Socket *socket, const Sockaddr &bind_address)
- : messenger_(messenger),
-   socket_(socket->Release()),
-   bind_address_(bind_address),
-   rpc_connections_accepted_(METRIC_rpc_connections_accepted.Instantiate(
-                                 messenger->metric_entity())),
-   closing_(false) {
-}
+AcceptorPool::AcceptorPool(Messenger* messenger, Socket* socket,
+                           Sockaddr bind_address)
+    : messenger_(messenger),
+      socket_(socket->Release()),
+      bind_address_(std::move(bind_address)),
+      rpc_connections_accepted_(METRIC_rpc_connections_accepted.Instantiate(
+          messenger->metric_entity())),
+      closing_(false) {}
 
 AcceptorPool::~AcceptorPool() {
   Shutdown();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/acceptor_pool.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/acceptor_pool.h b/src/kudu/rpc/acceptor_pool.h
index 7da78be..92b7fc5 100644
--- a/src/kudu/rpc/acceptor_pool.h
+++ b/src/kudu/rpc/acceptor_pool.h
@@ -43,8 +43,7 @@ class AcceptorPool {
   // Create a new acceptor pool.  Calls socket::Release to take ownership of the
   // socket.
   // 'socket' must be already bound, but should not yet be listening.
-  AcceptorPool(Messenger *messenger,
-               Socket *socket, const Sockaddr &bind_address);
+  AcceptorPool(Messenger *messenger, Socket *socket, Sockaddr bind_address);
   ~AcceptorPool();
 
   // Start listening and accepting connections.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/connection.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/connection.cc b/src/kudu/rpc/connection.cc
index c861373..5052e5d 100644
--- a/src/kudu/rpc/connection.cc
+++ b/src/kudu/rpc/connection.cc
@@ -54,19 +54,18 @@ namespace rpc {
 ///
 /// Connection
 ///
-Connection::Connection(ReactorThread *reactor_thread, const Sockaddr &remote,
+Connection::Connection(ReactorThread *reactor_thread, Sockaddr remote,
                        int socket, Direction direction)
-  : reactor_thread_(reactor_thread),
-    socket_(socket),
-    remote_(remote),
-    direction_(direction),
-    last_activity_time_(MonoTime::Now(MonoTime::FINE)),
-    is_epoll_registered_(false),
-    next_call_id_(1),
-    sasl_client_(kSaslAppName, socket),
-    sasl_server_(kSaslAppName, socket),
-    negotiation_complete_(false) {
-}
+    : reactor_thread_(reactor_thread),
+      socket_(socket),
+      remote_(std::move(remote)),
+      direction_(direction),
+      last_activity_time_(MonoTime::Now(MonoTime::FINE)),
+      is_epoll_registered_(false),
+      next_call_id_(1),
+      sasl_client_(kSaslAppName, socket),
+      sasl_server_(kSaslAppName, socket),
+      negotiation_complete_(false) {}
 
 Status Connection::SetNonBlocking(bool enabled) {
   return socket_.SetNonBlocking(enabled);
@@ -221,9 +220,8 @@ void Connection::HandleOutboundCallTimeout(CallAwaitingResponse *car) {
 // has been fully transmitted.
 struct CallTransferCallbacks : public TransferCallbacks {
  public:
-  explicit CallTransferCallbacks(const shared_ptr<OutboundCall> &call)
-    : call_(call) {
-  }
+  explicit CallTransferCallbacks(shared_ptr<OutboundCall> call)
+      : call_(std::move(call)) {}
 
   virtual void NotifyTransferFinished() OVERRIDE {
     // TODO: would be better to cancel the transfer while it is still on the queue if we

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/connection.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/connection.h b/src/kudu/rpc/connection.h
index 9dbaf1f..9ad7e42 100644
--- a/src/kudu/rpc/connection.h
+++ b/src/kudu/rpc/connection.h
@@ -79,8 +79,8 @@ class Connection : public RefCountedThreadSafe<Connection> {
   // remote: the address of the remote end
   // socket: the socket to take ownership of.
   // direction: whether we are the client or server side
-  Connection(ReactorThread *reactor_thread, const Sockaddr &remote,
-             int socket, Direction direction);
+  Connection(ReactorThread *reactor_thread, Sockaddr remote, int socket,
+             Direction direction);
 
   // Set underlying socket to non-blocking (or blocking) mode.
   Status SetNonBlocking(bool enabled);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/messenger.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/messenger.cc b/src/kudu/rpc/messenger.cc
index 739916e..dfad386 100644
--- a/src/kudu/rpc/messenger.cc
+++ b/src/kudu/rpc/messenger.cc
@@ -64,13 +64,13 @@ namespace rpc {
 class Messenger;
 class ServerBuilder;
 
-MessengerBuilder::MessengerBuilder(const std::string &name)
-  : name_(name),
-    connection_keepalive_time_(MonoDelta::FromMilliseconds(FLAGS_rpc_default_keepalive_time_ms)),
-    num_reactors_(4),
-    num_negotiation_threads_(4),
-    coarse_timer_granularity_(MonoDelta::FromMilliseconds(100)) {
-}
+MessengerBuilder::MessengerBuilder(std::string name)
+    : name_(std::move(name)),
+      connection_keepalive_time_(
+          MonoDelta::FromMilliseconds(FLAGS_rpc_default_keepalive_time_ms)),
+      num_reactors_(4),
+      num_negotiation_threads_(4),
+      coarse_timer_granularity_(MonoDelta::FromMilliseconds(100)) {}
 
 MessengerBuilder& MessengerBuilder::set_connection_keepalive_time(const MonoDelta &keepalive) {
   connection_keepalive_time_ = keepalive;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/messenger.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/messenger.h b/src/kudu/rpc/messenger.h
index 82dd36b..5286780 100644
--- a/src/kudu/rpc/messenger.h
+++ b/src/kudu/rpc/messenger.h
@@ -55,9 +55,8 @@ class RpcService;
 
 struct AcceptorPoolInfo {
  public:
-  explicit AcceptorPoolInfo(const Sockaddr &bind_address)
-    : bind_address_(bind_address) {
-  }
+  explicit AcceptorPoolInfo(Sockaddr bind_address)
+      : bind_address_(std::move(bind_address)) {}
 
   Sockaddr bind_address() const {
     return bind_address_;
@@ -73,7 +72,7 @@ class MessengerBuilder {
   friend class Messenger;
   friend class ReactorThread;
 
-  explicit MessengerBuilder(const std::string &name);
+  explicit MessengerBuilder(std::string name);
 
   // Set the length of time we will keep a TCP connection will alive with no traffic.
   MessengerBuilder &set_connection_keepalive_time(const MonoDelta &keepalive);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/outbound_call.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/outbound_call.cc b/src/kudu/rpc/outbound_call.cc
index 628a021..e608dad 100644
--- a/src/kudu/rpc/outbound_call.cc
+++ b/src/kudu/rpc/outbound_call.cc
@@ -58,14 +58,13 @@ TAG_FLAG(rpc_callback_max_cycles, runtime);
 OutboundCall::OutboundCall(const ConnectionId& conn_id,
                            const RemoteMethod& remote_method,
                            google::protobuf::Message* response_storage,
-                           RpcController* controller,
-                           const ResponseCallback& callback)
-  : state_(READY),
-    remote_method_(remote_method),
-    conn_id_(conn_id),
-    callback_(callback),
-    controller_(DCHECK_NOTNULL(controller)),
-    response_(DCHECK_NOTNULL(response_storage)) {
+                           RpcController* controller, ResponseCallback callback)
+    : state_(READY),
+      remote_method_(remote_method),
+      conn_id_(conn_id),
+      callback_(std::move(callback)),
+      controller_(DCHECK_NOTNULL(controller)),
+      response_(DCHECK_NOTNULL(response_storage)) {
   DVLOG(4) << "OutboundCall " << this << " constructed with state_: " << StateName(state_)
            << " and RPC timeout: "
            << (controller->timeout().Initialized() ? controller->timeout().ToString() : "none");

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/outbound_call.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/outbound_call.h b/src/kudu/rpc/outbound_call.h
index 7596e1c..2155752 100644
--- a/src/kudu/rpc/outbound_call.h
+++ b/src/kudu/rpc/outbound_call.h
@@ -158,12 +158,9 @@ class ConnectionIdEqual {
 // of different threads, making it tricky to enforce single ownership.
 class OutboundCall {
  public:
-
-  OutboundCall(const ConnectionId& conn_id,
-               const RemoteMethod& remote_method,
+  OutboundCall(const ConnectionId& conn_id, const RemoteMethod& remote_method,
                google::protobuf::Message* response_storage,
-               RpcController* controller,
-               const ResponseCallback& callback);
+               RpcController* controller, ResponseCallback callback);
 
   ~OutboundCall();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/proxy.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/proxy.cc b/src/kudu/rpc/proxy.cc
index b5e94d6..d2e7537 100644
--- a/src/kudu/rpc/proxy.cc
+++ b/src/kudu/rpc/proxy.cc
@@ -46,11 +46,10 @@ namespace kudu {
 namespace rpc {
 
 Proxy::Proxy(const std::shared_ptr<Messenger>& messenger,
-             const Sockaddr& remote,
-             const string& service_name)
-  : service_name_(service_name),
-    messenger_(messenger),
-    is_started_(false) {
+             const Sockaddr& remote, string service_name)
+    : service_name_(std::move(service_name)),
+      messenger_(messenger),
+      is_started_(false) {
   CHECK(messenger != nullptr);
   DCHECK(!service_name_.empty()) << "Proxy service name must not be blank";
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/proxy.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/proxy.h b/src/kudu/rpc/proxy.h
index ae2f8ea..73fcdd9 100644
--- a/src/kudu/rpc/proxy.h
+++ b/src/kudu/rpc/proxy.h
@@ -55,9 +55,8 @@ class Messenger;
 // After initialization, multiple threads may make calls using the same proxy object.
 class Proxy {
  public:
-  Proxy(const std::shared_ptr<Messenger>& messenger,
-        const Sockaddr& remote,
-        const std::string& service_name);
+  Proxy(const std::shared_ptr<Messenger>& messenger, const Sockaddr& remote,
+        std::string service_name);
   ~Proxy();
 
   // Call a remote method asynchronously.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/reactor.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.cc b/src/kudu/rpc/reactor.cc
index 6ea8448..6f6be20 100644
--- a/src/kudu/rpc/reactor.cc
+++ b/src/kudu/rpc/reactor.cc
@@ -446,12 +446,9 @@ void ReactorThread::DestroyConnection(Connection *conn,
   }
 }
 
-DelayedTask::DelayedTask(const boost::function<void(const Status&)>& func,
+DelayedTask::DelayedTask(boost::function<void(const Status &)> func,
                          MonoDelta when)
-  : func_(func),
-    when_(when),
-    thread_(nullptr) {
-}
+    : func_(std::move(func)), when_(std::move(when)), thread_(nullptr) {}
 
 void DelayedTask::Run(ReactorThread* thread) {
   DCHECK(thread_ == nullptr) << "Task has already been scheduled";
@@ -535,10 +532,8 @@ bool Reactor::closing() const {
 // Task to call an arbitrary function within the reactor thread.
 class RunFunctionTask : public ReactorTask {
  public:
-  explicit RunFunctionTask(const boost::function<Status()>& f) :
-    function_(f),
-    latch_(1)
-  {}
+  explicit RunFunctionTask(boost::function<Status()> f)
+      : function_(std::move(f)), latch_(1) {}
 
   virtual void Run(ReactorThread *reactor) OVERRIDE {
     status_ = function_();
@@ -612,9 +607,8 @@ void Reactor::RegisterInboundSocket(Socket *socket, const Sockaddr &remote) {
 // to a connection.
 class AssignOutboundCallTask : public ReactorTask {
  public:
-  explicit AssignOutboundCallTask(const shared_ptr<OutboundCall> &call) :
-    call_(call)
-  {}
+  explicit AssignOutboundCallTask(shared_ptr<OutboundCall> call)
+      : call_(std::move(call)) {}
 
   virtual void Run(ReactorThread *reactor) OVERRIDE {
     reactor->AssignOutboundCall(call_);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/reactor.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/reactor.h b/src/kudu/rpc/reactor.h
index a627327..008b952 100644
--- a/src/kudu/rpc/reactor.h
+++ b/src/kudu/rpc/reactor.h
@@ -86,8 +86,7 @@ class ReactorTask : public boost::intrusive::list_base_hook<> {
 //    receives a Status as its first argument.
 class DelayedTask : public ReactorTask {
  public:
-  DelayedTask(const boost::function<void(const Status&)>& func,
-              MonoDelta when);
+  DelayedTask(boost::function<void(const Status &)> func, MonoDelta when);
 
   // Schedules the task for running later but doesn't actually run it yet.
   virtual void Run(ReactorThread* reactor) OVERRIDE;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/remote_method.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/remote_method.cc b/src/kudu/rpc/remote_method.cc
index 451e96a..32ec40d 100644
--- a/src/kudu/rpc/remote_method.cc
+++ b/src/kudu/rpc/remote_method.cc
@@ -26,10 +26,9 @@ namespace rpc {
 
 using strings::Substitute;
 
-RemoteMethod::RemoteMethod(const std::string& service_name, const std::string method_name)
-    : service_name_(service_name),
-      method_name_(method_name) {
-}
+RemoteMethod::RemoteMethod(std::string service_name,
+                           const std::string method_name)
+    : service_name_(std::move(service_name)), method_name_(method_name) {}
 
 void RemoteMethod::FromPB(const RemoteMethodPB& pb) {
   DCHECK(pb.IsInitialized()) << "PB is uninitialized: " << pb.InitializationErrorString();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/remote_method.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/remote_method.h b/src/kudu/rpc/remote_method.h
index 4e11b70..5b78dad 100644
--- a/src/kudu/rpc/remote_method.h
+++ b/src/kudu/rpc/remote_method.h
@@ -30,7 +30,7 @@ class RemoteMethodPB;
 class RemoteMethod {
  public:
   RemoteMethod() {}
-  RemoteMethod(const std::string& service_name, const std::string method_name);
+  RemoteMethod(std::string service_name, const std::string method_name);
   std::string service_name() const { return service_name_; }
   std::string method_name() const { return method_name_; }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/rpc.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/rpc.h b/src/kudu/rpc/rpc.h
index 0926e7f..8eb4456 100644
--- a/src/kudu/rpc/rpc.h
+++ b/src/kudu/rpc/rpc.h
@@ -37,11 +37,10 @@ class Rpc;
 // All RPCs should use HandleResponse() to retry certain generic errors.
 class RpcRetrier {
  public:
-  RpcRetrier(const MonoTime& deadline,
-             const std::shared_ptr<rpc::Messenger>& messenger)
-    : attempt_num_(1),
-      deadline_(deadline),
-      messenger_(messenger) {
+  RpcRetrier(MonoTime deadline, std::shared_ptr<rpc::Messenger> messenger)
+      : attempt_num_(1),
+        deadline_(std::move(deadline)),
+        messenger_(std::move(messenger)) {
     if (deadline_.Initialized()) {
       controller_.set_deadline(deadline_);
     }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/sasl_client.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_client.cc b/src/kudu/rpc/sasl_client.cc
index c68351f..675e1b0 100644
--- a/src/kudu/rpc/sasl_client.cc
+++ b/src/kudu/rpc/sasl_client.cc
@@ -80,14 +80,13 @@ static Status StatusFromRpcError(const ErrorStatusPB& error) {
   }
 }
 
-SaslClient::SaslClient(const string& app_name, int fd)
-  : app_name_(app_name),
-    sock_(fd),
-    helper_(SaslHelper::CLIENT),
-    client_state_(SaslNegotiationState::NEW),
-    negotiated_mech_(SaslMechanism::INVALID),
-    deadline_(MonoTime::Max()) {
-
+SaslClient::SaslClient(string app_name, int fd)
+    : app_name_(std::move(app_name)),
+      sock_(fd),
+      helper_(SaslHelper::CLIENT),
+      client_state_(SaslNegotiationState::NEW),
+      negotiated_mech_(SaslMechanism::INVALID),
+      deadline_(MonoTime::Max()) {
   callbacks_.push_back(SaslBuildCallback(SASL_CB_GETOPT,
       reinterpret_cast<int (*)()>(&SaslClientGetoptCb), this));
   callbacks_.push_back(SaslBuildCallback(SASL_CB_AUTHNAME,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/sasl_client.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_client.h b/src/kudu/rpc/sasl_client.h
index 6151326..b9f460b 100644
--- a/src/kudu/rpc/sasl_client.h
+++ b/src/kudu/rpc/sasl_client.h
@@ -45,7 +45,7 @@ class SaslMessagePB_SaslAuth;
 class SaslClient {
  public:
   // Does not take ownership of the socket indicated by the fd.
-  SaslClient(const string& app_name, int fd);
+  SaslClient(string app_name, int fd);
   ~SaslClient();
 
   // Enable ANONYMOUS authentication.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/sasl_server.cc
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_server.cc b/src/kudu/rpc/sasl_server.cc
index b2b4ac8..308d66b 100644
--- a/src/kudu/rpc/sasl_server.cc
+++ b/src/kudu/rpc/sasl_server.cc
@@ -51,14 +51,13 @@ static int SaslServerPlainAuthCb(sasl_conn_t *conn, void *sasl_server, const cha
     ->PlainAuthCb(conn, user, pass, passlen, propctx);
 }
 
-SaslServer::SaslServer(const string& app_name, int fd)
-  : app_name_(app_name),
-    sock_(fd),
-    helper_(SaslHelper::SERVER),
-    server_state_(SaslNegotiationState::NEW),
-    negotiated_mech_(SaslMechanism::INVALID),
-    deadline_(MonoTime::Max()) {
-
+SaslServer::SaslServer(string app_name, int fd)
+    : app_name_(std::move(app_name)),
+      sock_(fd),
+      helper_(SaslHelper::SERVER),
+      server_state_(SaslNegotiationState::NEW),
+      negotiated_mech_(SaslMechanism::INVALID),
+      deadline_(MonoTime::Max()) {
   callbacks_.push_back(SaslBuildCallback(SASL_CB_GETOPT,
       reinterpret_cast<int (*)()>(&SaslServerGetoptCb), this));
   callbacks_.push_back(SaslBuildCallback(SASL_CB_SERVER_USERDB_CHECKPASS,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/rpc/sasl_server.h
----------------------------------------------------------------------
diff --git a/src/kudu/rpc/sasl_server.h b/src/kudu/rpc/sasl_server.h
index 159da4e..e71e958 100644
--- a/src/kudu/rpc/sasl_server.h
+++ b/src/kudu/rpc/sasl_server.h
@@ -46,7 +46,7 @@ class AuthStore;
 class SaslServer {
  public:
   // Does not take ownership of the socket indicated by the fd.
-  SaslServer(const string& app_name, int fd);
+  SaslServer(string app_name, int fd);
   ~SaslServer();
 
   // Enable ANONYMOUS authentication.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/server/rpc_server.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/rpc_server.cc b/src/kudu/server/rpc_server.cc
index d9772b8..aab4220 100644
--- a/src/kudu/server/rpc_server.cc
+++ b/src/kudu/server/rpc_server.cc
@@ -74,10 +74,8 @@ RpcServerOptions::RpcServerOptions()
     service_queue_length(FLAGS_rpc_service_queue_length) {
 }
 
-RpcServer::RpcServer(const RpcServerOptions& opts)
-  : server_state_(UNINITIALIZED),
-    options_(opts) {
-}
+RpcServer::RpcServer(RpcServerOptions opts)
+    : server_state_(UNINITIALIZED), options_(std::move(opts)) {}
 
 RpcServer::~RpcServer() {
   Shutdown();

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/server/rpc_server.h
----------------------------------------------------------------------
diff --git a/src/kudu/server/rpc_server.h b/src/kudu/server/rpc_server.h
index 5ba8250..1d201b1 100644
--- a/src/kudu/server/rpc_server.h
+++ b/src/kudu/server/rpc_server.h
@@ -47,7 +47,7 @@ struct RpcServerOptions {
 
 class RpcServer {
  public:
-  explicit RpcServer(const RpcServerOptions& opts);
+  explicit RpcServer(RpcServerOptions opts);
   ~RpcServer();
 
   Status Init(const std::shared_ptr<rpc::Messenger>& messenger);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/server/server_base.cc
----------------------------------------------------------------------
diff --git a/src/kudu/server/server_base.cc b/src/kudu/server/server_base.cc
index 85303c1..edcf56f 100644
--- a/src/kudu/server/server_base.cc
+++ b/src/kudu/server/server_base.cc
@@ -84,18 +84,18 @@ shared_ptr<MemTracker> CreateMemTrackerForServer() {
 
 } // anonymous namespace
 
-ServerBase::ServerBase(const string& name,
-                       const ServerBaseOptions& options,
+ServerBase::ServerBase(string name, const ServerBaseOptions& options,
                        const string& metric_namespace)
-  : name_(name),
-    mem_tracker_(CreateMemTrackerForServer()),
-    metric_registry_(new MetricRegistry()),
-    metric_entity_(METRIC_ENTITY_server.Instantiate(metric_registry_.get(), metric_namespace)),
-    rpc_server_(new RpcServer(options.rpc_opts)),
-    web_server_(new Webserver(options.webserver_opts)),
-    is_first_run_(false),
-    options_(options),
-    stop_metrics_logging_latch_(1) {
+    : name_(std::move(name)),
+      mem_tracker_(CreateMemTrackerForServer()),
+      metric_registry_(new MetricRegistry()),
+      metric_entity_(METRIC_ENTITY_server.Instantiate(metric_registry_.get(),
+                                                      metric_namespace)),
+      rpc_server_(new RpcServer(options.rpc_opts)),
+      web_server_(new Webserver(options.webserver_opts)),
+      is_first_run_(false),
+      options_(options),
+      stop_metrics_logging_latch_(1) {
   FsManagerOpts fs_opts;
   fs_opts.metric_entity = metric_entity_;
   fs_opts.parent_mem_tracker = mem_tracker_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/server/server_base.h
----------------------------------------------------------------------
diff --git a/src/kudu/server/server_base.h b/src/kudu/server/server_base.h
index af4ca63..ec26ce9 100644
--- a/src/kudu/server/server_base.h
+++ b/src/kudu/server/server_base.h
@@ -88,8 +88,7 @@ class ServerBase {
   void GetStatusPB(ServerStatusPB* status) const;
 
  protected:
-  ServerBase(const std::string& name,
-             const ServerBaseOptions& options,
+  ServerBase(std::string name, const ServerBaseOptions& options,
              const std::string& metrics_namespace);
   virtual ~ServerBase();
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/server/webserver.h
----------------------------------------------------------------------
diff --git a/src/kudu/server/webserver.h b/src/kudu/server/webserver.h
index 14b79f8..a45261c 100644
--- a/src/kudu/server/webserver.h
+++ b/src/kudu/server/webserver.h
@@ -80,11 +80,10 @@ class Webserver : public WebCallbackRegistry {
   // Container class for a list of path handler callbacks for a single URL.
   class PathHandler {
    public:
-    PathHandler(bool is_styled, bool is_on_nav_bar, const std::string& alias)
+    PathHandler(bool is_styled, bool is_on_nav_bar, std::string alias)
         : is_styled_(is_styled),
           is_on_nav_bar_(is_on_nav_bar),
-          alias_(alias) {
-    }
+          alias_(std::move(alias)) {}
 
     void AddCallback(const PathHandlerCallback& callback) {
       callbacks_.push_back(callback);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/cfile_set.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.cc b/src/kudu/tablet/cfile_set.cc
index d5a5e07..0f64e08 100644
--- a/src/kudu/tablet/cfile_set.cc
+++ b/src/kudu/tablet/cfile_set.cc
@@ -65,9 +65,8 @@ static Status OpenReader(const shared_ptr<RowSetMetadata>& rowset_metadata,
 // CFile Base
 ////////////////////////////////////////////////////////////
 
-CFileSet::CFileSet(const shared_ptr<RowSetMetadata>& rowset_metadata)
-  : rowset_metadata_(rowset_metadata) {
-}
+CFileSet::CFileSet(shared_ptr<RowSetMetadata> rowset_metadata)
+    : rowset_metadata_(std::move(rowset_metadata)) {}
 
 CFileSet::~CFileSet() {
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/cfile_set.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/cfile_set.h b/src/kudu/tablet/cfile_set.h
index 348edd3..5e00905 100644
--- a/src/kudu/tablet/cfile_set.h
+++ b/src/kudu/tablet/cfile_set.h
@@ -57,7 +57,7 @@ class CFileSet : public std::enable_shared_from_this<CFileSet> {
  public:
   class Iterator;
 
-  explicit CFileSet(const std::shared_ptr<RowSetMetadata>& rowset_metadata);
+  explicit CFileSet(std::shared_ptr<RowSetMetadata> rowset_metadata);
 
   Status Open();
 
@@ -177,13 +177,12 @@ class CFileSet::Iterator : public ColumnwiseIterator {
   friend class CFileSet;
 
   // 'projection' must remain valid for the lifetime of this object.
-  Iterator(const std::shared_ptr<CFileSet const> &base_data,
-           const Schema *projection)
-    : base_data_(base_data),
-      projection_(projection),
-      initted_(false),
-      cur_idx_(0),
-      prepared_count_(0) {
+  Iterator(std::shared_ptr<CFileSet const> base_data, const Schema *projection)
+      : base_data_(std::move(base_data)),
+        projection_(projection),
+        initted_(false),
+        cur_idx_(0),
+        prepared_count_(0) {
     CHECK_OK(base_data_->CountRows(&row_count_));
   }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/compaction.cc b/src/kudu/tablet/compaction.cc
index 1ec9892..df4bcbf 100644
--- a/src/kudu/tablet/compaction.cc
+++ b/src/kudu/tablet/compaction.cc
@@ -134,17 +134,16 @@ class MemRowSetCompactionInput : public CompactionInput {
 class DiskRowSetCompactionInput : public CompactionInput {
  public:
   DiskRowSetCompactionInput(gscoped_ptr<RowwiseIterator> base_iter,
-                        shared_ptr<DeltaIterator> redo_delta_iter,
-                        shared_ptr<DeltaIterator> undo_delta_iter) :
-    base_iter_(base_iter.Pass()),
-    redo_delta_iter_(redo_delta_iter),
-    undo_delta_iter_(undo_delta_iter),
-    arena_(32*1024, 128*1024),
-    block_(base_iter_->schema(), kRowsPerBlock, &arena_),
-    redo_mutation_block_(kRowsPerBlock, reinterpret_cast<Mutation *>(NULL)),
-    undo_mutation_block_(kRowsPerBlock, reinterpret_cast<Mutation *>(NULL)),
-    first_rowid_in_block_(0)
-  {}
+                            shared_ptr<DeltaIterator> redo_delta_iter,
+                            shared_ptr<DeltaIterator> undo_delta_iter)
+      : base_iter_(base_iter.Pass()),
+        redo_delta_iter_(std::move(redo_delta_iter)),
+        undo_delta_iter_(std::move(undo_delta_iter)),
+        arena_(32 * 1024, 128 * 1024),
+        block_(base_iter_->schema(), kRowsPerBlock, &arena_),
+        redo_mutation_block_(kRowsPerBlock, reinterpret_cast<Mutation *>(NULL)),
+        undo_mutation_block_(kRowsPerBlock, reinterpret_cast<Mutation *>(NULL)),
+        first_rowid_in_block_(0) {}
 
   virtual Status Init() OVERRIDE {
     ScanSpec spec;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/concurrent_btree.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/concurrent_btree.h b/src/kudu/tablet/concurrent_btree.h
index 84a260a..f867284 100644
--- a/src/kudu/tablet/concurrent_btree.h
+++ b/src/kudu/tablet/concurrent_btree.h
@@ -815,12 +815,8 @@ class PreparedMutation {
   //
   // The data referred to by the 'key' Slice passed in themust remain
   // valid for the lifetime of the PreparedMutation object.
-  explicit PreparedMutation(const Slice &key) :
-    key_(key),
-    tree_(NULL),
-    leaf_(NULL),
-    needs_unlock_(false)
-  {}
+  explicit PreparedMutation(Slice key)
+      : key_(std::move(key)), tree_(NULL), leaf_(NULL), needs_unlock_(false) {}
 
   ~PreparedMutation() {
     UnPrepare();
@@ -940,11 +936,8 @@ class CBTree {
       frozen_(false) {
   }
 
-  explicit CBTree(const std::shared_ptr<typename Traits::ArenaType>& arena)
-      : arena_(arena),
-        root_(NewLeaf(false)),
-        frozen_(false) {
-  }
+  explicit CBTree(std::shared_ptr<typename Traits::ArenaType> arena)
+      : arena_(std::move(arena)), root_(NewLeaf(false)), frozen_(false) {}
 
   ~CBTree() {
     RecursiveDelete(root_);

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_applier.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_applier.cc b/src/kudu/tablet/delta_applier.cc
index f809f21..7439b10 100644
--- a/src/kudu/tablet/delta_applier.cc
+++ b/src/kudu/tablet/delta_applier.cc
@@ -31,12 +31,11 @@ namespace kudu {
 namespace tablet {
 
   // Construct. The base_iter and delta_iter should not be Initted.
-DeltaApplier::DeltaApplier(const shared_ptr<CFileSet::Iterator>& base_iter,
-                           const shared_ptr<DeltaIterator>& delta_iter)
-  : base_iter_(base_iter),
-    delta_iter_(delta_iter),
-    first_prepare_(true) {
-}
+DeltaApplier::DeltaApplier(shared_ptr<CFileSet::Iterator> base_iter,
+                           shared_ptr<DeltaIterator> delta_iter)
+    : base_iter_(std::move(base_iter)),
+      delta_iter_(std::move(delta_iter)),
+      first_prepare_(true) {}
 
 DeltaApplier::~DeltaApplier() {
 }

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_applier.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_applier.h b/src/kudu/tablet/delta_applier.h
index da37458..5877978 100644
--- a/src/kudu/tablet/delta_applier.h
+++ b/src/kudu/tablet/delta_applier.h
@@ -70,8 +70,8 @@ class DeltaApplier : public ColumnwiseIterator {
   DISALLOW_COPY_AND_ASSIGN(DeltaApplier);
 
   // Construct. The base_iter and delta_iter should not be Initted.
-  DeltaApplier(const std::shared_ptr<CFileSet::Iterator>& base_iter,
-               const std::shared_ptr<DeltaIterator>& delta_iter);
+  DeltaApplier(std::shared_ptr<CFileSet::Iterator> base_iter,
+               std::shared_ptr<DeltaIterator> delta_iter);
   virtual ~DeltaApplier();
 
   std::shared_ptr<CFileSet::Iterator> base_iter_;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_compaction.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_compaction.cc b/src/kudu/tablet/delta_compaction.cc
index a186c75..8defcfb 100644
--- a/src/kudu/tablet/delta_compaction.cc
+++ b/src/kudu/tablet/delta_compaction.cc
@@ -56,21 +56,20 @@ const size_t kRowsPerBlock = 100; // Number of rows per block of columns
 
 // TODO: can you major-delta-compact a new column after an alter table in order
 // to materialize it? should write a test for this.
-MajorDeltaCompaction::MajorDeltaCompaction(FsManager* fs_manager,
-                                           const Schema& base_schema,
-                                           CFileSet* base_data,
-                                           const shared_ptr<DeltaIterator>& delta_iter,
-                                           const vector<shared_ptr<DeltaStore> >& included_stores,
-                                           const vector<ColumnId>& col_ids)
-  : fs_manager_(fs_manager),
-    base_schema_(base_schema),
-    column_ids_(col_ids),
-    base_data_(base_data),
-    included_stores_(included_stores),
-    delta_iter_(delta_iter),
-    redo_delta_mutations_written_(0),
-    undo_delta_mutations_written_(0),
-    state_(kInitialized) {
+MajorDeltaCompaction::MajorDeltaCompaction(
+    FsManager* fs_manager, const Schema& base_schema, CFileSet* base_data,
+    shared_ptr<DeltaIterator> delta_iter,
+    vector<shared_ptr<DeltaStore> > included_stores,
+    const vector<ColumnId>& col_ids)
+    : fs_manager_(fs_manager),
+      base_schema_(base_schema),
+      column_ids_(col_ids),
+      base_data_(base_data),
+      included_stores_(std::move(included_stores)),
+      delta_iter_(std::move(delta_iter)),
+      redo_delta_mutations_written_(0),
+      undo_delta_mutations_written_(0),
+      state_(kInitialized) {
   CHECK(!col_ids.empty());
 }
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_compaction.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_compaction.h b/src/kudu/tablet/delta_compaction.h
index 048a5dc..d8571f1 100644
--- a/src/kudu/tablet/delta_compaction.h
+++ b/src/kudu/tablet/delta_compaction.h
@@ -52,12 +52,11 @@ class MajorDeltaCompaction {
   //
   // TODO: is base_schema supposed to be the same as base_data->schema()? how about
   // in an ALTER scenario?
-  MajorDeltaCompaction(FsManager* fs_manager,
-                       const Schema& base_schema,
-                       CFileSet* base_data,
-                       const std::shared_ptr<DeltaIterator>& delta_iter,
-                       const std::vector<std::shared_ptr<DeltaStore> >& included_stores,
-                       const std::vector<ColumnId>& col_ids);
+  MajorDeltaCompaction(
+      FsManager* fs_manager, const Schema& base_schema, CFileSet* base_data,
+      std::shared_ptr<DeltaIterator> delta_iter,
+      std::vector<std::shared_ptr<DeltaStore> > included_stores,
+      const std::vector<ColumnId>& col_ids);
   ~MajorDeltaCompaction();
 
   // Executes the compaction.

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_iterator_merger.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_iterator_merger.cc b/src/kudu/tablet/delta_iterator_merger.cc
index 90a2381..9ce37fd 100644
--- a/src/kudu/tablet/delta_iterator_merger.cc
+++ b/src/kudu/tablet/delta_iterator_merger.cc
@@ -32,9 +32,9 @@ using std::string;
 using std::vector;
 using strings::Substitute;
 
-DeltaIteratorMerger::DeltaIteratorMerger(const vector<shared_ptr<DeltaIterator> > &iters)
-  : iters_(iters) {
-}
+DeltaIteratorMerger::DeltaIteratorMerger(
+    vector<shared_ptr<DeltaIterator> > iters)
+    : iters_(std::move(iters)) {}
 
 Status DeltaIteratorMerger::Init(ScanSpec *spec) {
   for (const shared_ptr<DeltaIterator> &iter : iters_) {

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_iterator_merger.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_iterator_merger.h b/src/kudu/tablet/delta_iterator_merger.h
index 0021791..e703447 100644
--- a/src/kudu/tablet/delta_iterator_merger.h
+++ b/src/kudu/tablet/delta_iterator_merger.h
@@ -60,7 +60,7 @@ class DeltaIteratorMerger : public DeltaIterator {
   virtual std::string ToString() const OVERRIDE;
 
  private:
-  explicit DeltaIteratorMerger(const vector<std::shared_ptr<DeltaIterator> > &iters);
+  explicit DeltaIteratorMerger(vector<std::shared_ptr<DeltaIterator> > iters);
 
   std::vector<std::shared_ptr<DeltaIterator> > iters_;
 };

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_key.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_key.h b/src/kudu/tablet/delta_key.h
index f43af76..d5338b1 100644
--- a/src/kudu/tablet/delta_key.h
+++ b/src/kudu/tablet/delta_key.h
@@ -50,11 +50,8 @@ class DeltaKey {
     row_idx_(-1)
   {}
 
-  DeltaKey(rowid_t id, const Timestamp &timestamp) :
-    row_idx_(id),
-    timestamp_(timestamp) {
-  }
-
+  DeltaKey(rowid_t id, Timestamp timestamp)
+      : row_idx_(id), timestamp_(std::move(timestamp)) {}
 
   // Encode this key into the given buffer.
   //

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_tracker.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_tracker.cc b/src/kudu/tablet/delta_tracker.cc
index 6d2dddc..6e7df93 100644
--- a/src/kudu/tablet/delta_tracker.cc
+++ b/src/kudu/tablet/delta_tracker.cc
@@ -36,16 +36,15 @@ using std::shared_ptr;
 using std::string;
 using strings::Substitute;
 
-DeltaTracker::DeltaTracker(const shared_ptr<RowSetMetadata>& rowset_metadata,
+DeltaTracker::DeltaTracker(shared_ptr<RowSetMetadata> rowset_metadata,
                            rowid_t num_rows,
                            log::LogAnchorRegistry* log_anchor_registry,
-                           const shared_ptr<MemTracker>& parent_tracker) :
-  rowset_metadata_(rowset_metadata),
-  num_rows_(num_rows),
-  open_(false),
-  log_anchor_registry_(log_anchor_registry),
-  parent_tracker_(parent_tracker) {
-}
+                           shared_ptr<MemTracker> parent_tracker)
+    : rowset_metadata_(std::move(rowset_metadata)),
+      num_rows_(num_rows),
+      open_(false),
+      log_anchor_registry_(log_anchor_registry),
+      parent_tracker_(std::move(parent_tracker)) {}
 
 Status DeltaTracker::OpenDeltaReaders(const vector<BlockId>& blocks,
                                       vector<shared_ptr<DeltaStore> >* stores,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/delta_tracker.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/delta_tracker.h b/src/kudu/tablet/delta_tracker.h
index e3f6b08..9c636f8 100644
--- a/src/kudu/tablet/delta_tracker.h
+++ b/src/kudu/tablet/delta_tracker.h
@@ -67,10 +67,9 @@ class DeltaTracker {
     NO_FLUSH_METADATA
   };
 
-  DeltaTracker(const std::shared_ptr<RowSetMetadata>& rowset_metadata,
-               rowid_t num_rows,
-               log::LogAnchorRegistry* log_anchor_registry,
-               const std::shared_ptr<MemTracker>& parent_tracker);
+  DeltaTracker(std::shared_ptr<RowSetMetadata> rowset_metadata,
+               rowid_t num_rows, log::LogAnchorRegistry* log_anchor_registry,
+               std::shared_ptr<MemTracker> parent_tracker);
 
   Status WrapIterator(const std::shared_ptr<CFileSet::Iterator> &base,
                       const MvccSnapshot &mvcc_snap,

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/deltafile.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile.cc b/src/kudu/tablet/deltafile.cc
index 97f31e0..136f4f0 100644
--- a/src/kudu/tablet/deltafile.cc
+++ b/src/kudu/tablet/deltafile.cc
@@ -198,13 +198,11 @@ Status DeltaFileReader::OpenNoInit(gscoped_ptr<ReadableBlock> block,
   return Status::OK();
 }
 
-DeltaFileReader::DeltaFileReader(const BlockId& block_id,
-                                 CFileReader *cf_reader,
+DeltaFileReader::DeltaFileReader(BlockId block_id, CFileReader *cf_reader,
                                  DeltaType delta_type)
-  : reader_(cf_reader),
-    block_id_(block_id),
-    delta_type_(delta_type) {
-}
+    : reader_(cf_reader),
+      block_id_(std::move(block_id)),
+      delta_type_(delta_type) {}
 
 Status DeltaFileReader::Init() {
   return init_once_.Init(&DeltaFileReader::InitOnce, this);
@@ -330,21 +328,19 @@ uint64_t DeltaFileReader::EstimateSize() const {
 // DeltaFileIterator
 ////////////////////////////////////////////////////////////
 
-DeltaFileIterator::DeltaFileIterator(const shared_ptr<DeltaFileReader>& dfr,
+DeltaFileIterator::DeltaFileIterator(shared_ptr<DeltaFileReader> dfr,
                                      const Schema *projection,
-                                     const MvccSnapshot &snap,
-                                     DeltaType delta_type) :
-  dfr_(dfr),
-  projection_(projection),
-  mvcc_snap_(snap),
-  prepared_idx_(0xdeadbeef),
-  prepared_count_(0),
-  prepared_(false),
-  exhausted_(false),
-  initted_(false),
-  delta_type_(delta_type),
-  cache_blocks_(CFileReader::CACHE_BLOCK)
-{}
+                                     MvccSnapshot snap, DeltaType delta_type)
+    : dfr_(std::move(dfr)),
+      projection_(projection),
+      mvcc_snap_(std::move(snap)),
+      prepared_idx_(0xdeadbeef),
+      prepared_count_(0),
+      prepared_(false),
+      exhausted_(false),
+      initted_(false),
+      delta_type_(delta_type),
+      cache_blocks_(CFileReader::CACHE_BLOCK) {}
 
 Status DeltaFileIterator::Init(ScanSpec *spec) {
   DCHECK(!initted_) << "Already initted";

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/deltafile.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltafile.h b/src/kudu/tablet/deltafile.h
index cb9a46e..89df8c5 100644
--- a/src/kudu/tablet/deltafile.h
+++ b/src/kudu/tablet/deltafile.h
@@ -162,8 +162,7 @@ class DeltaFileReader : public DeltaStore,
     return reader_;
   }
 
-  DeltaFileReader(const BlockId& block_id,
-                  cfile::CFileReader *cf_reader,
+  DeltaFileReader(BlockId block_id, cfile::CFileReader *cf_reader,
                   DeltaType delta_type);
 
   // Callback used in 'init_once_' to initialize this delta file.
@@ -251,9 +250,8 @@ class DeltaFileIterator : public DeltaIterator {
 
   // The passed 'projection' and 'dfr' must remain valid for the lifetime
   // of the iterator.
-  DeltaFileIterator(const std::shared_ptr<DeltaFileReader>& dfr,
-                    const Schema *projection,
-                    const MvccSnapshot &snap,
+  DeltaFileIterator(std::shared_ptr<DeltaFileReader> dfr,
+                    const Schema *projection, MvccSnapshot snap,
                     DeltaType delta_type);
 
   // Determine the row index of the first update in the block currently

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/deltamemstore.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore.cc b/src/kudu/tablet/deltamemstore.cc
index aae1294..6e09669 100644
--- a/src/kudu/tablet/deltamemstore.cc
+++ b/src/kudu/tablet/deltamemstore.cc
@@ -175,19 +175,17 @@ void DeltaMemStore::DebugPrint() const {
 // DMSIterator
 ////////////////////////////////////////////////////////////
 
-DMSIterator::DMSIterator(const shared_ptr<const DeltaMemStore> &dms,
-                         const Schema *projection,
-                         const MvccSnapshot &snapshot)
-  : dms_(dms),
-    mvcc_snapshot_(snapshot),
-    iter_(dms->tree_->NewIterator()),
-    initted_(false),
-    prepared_idx_(0),
-    prepared_count_(0),
-    prepared_for_(NOT_PREPARED),
-    seeked_(false),
-    projection_(projection) {
-}
+DMSIterator::DMSIterator(const shared_ptr<const DeltaMemStore>& dms,
+                         const Schema* projection, MvccSnapshot snapshot)
+    : dms_(dms),
+      mvcc_snapshot_(std::move(snapshot)),
+      iter_(dms->tree_->NewIterator()),
+      initted_(false),
+      prepared_idx_(0),
+      prepared_count_(0),
+      prepared_for_(NOT_PREPARED),
+      seeked_(false),
+      projection_(projection) {}
 
 Status DMSIterator::Init(ScanSpec *spec) {
   initted_ = true;

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/deltamemstore.h
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/deltamemstore.h b/src/kudu/tablet/deltamemstore.h
index 387885e..cd81875 100644
--- a/src/kudu/tablet/deltamemstore.h
+++ b/src/kudu/tablet/deltamemstore.h
@@ -215,8 +215,7 @@ class DMSIterator : public DeltaIterator {
   // RowBlocks which are passed in, or else bad things will happen.
   // The pointer must also remain valid for the lifetime of the iterator.
   DMSIterator(const std::shared_ptr<const DeltaMemStore> &dms,
-              const Schema *projection,
-              const MvccSnapshot &snapshot);
+              const Schema *projection, MvccSnapshot snapshot);
 
   const std::shared_ptr<const DeltaMemStore> dms_;
 

http://git-wip-us.apache.org/repos/asf/incubator-kudu/blob/61934118/src/kudu/tablet/diskrowset.cc
----------------------------------------------------------------------
diff --git a/src/kudu/tablet/diskrowset.cc b/src/kudu/tablet/diskrowset.cc
index f4c6e21..d397e82 100644
--- a/src/kudu/tablet/diskrowset.cc
+++ b/src/kudu/tablet/diskrowset.cc
@@ -63,14 +63,14 @@ using std::string;
 const char *DiskRowSet::kMinKeyMetaEntryName = "min_key";
 const char *DiskRowSet::kMaxKeyMetaEntryName = "max_key";
 
-DiskRowSetWriter::DiskRowSetWriter(RowSetMetadata *rowset_metadata,
+DiskRowSetWriter::DiskRowSetWriter(RowSetMetadata* rowset_metadata,
                                    const Schema* schema,
-                                   const BloomFilterSizing &bloom_sizing)
-  : rowset_metadata_(rowset_metadata),
-    schema_(schema),
-    bloom_sizing_(bloom_sizing),
-    finished_(false),
-    written_count_(0) {
+                                   BloomFilterSizing bloom_sizing)
+    : rowset_metadata_(rowset_metadata),
+      schema_(schema),
+      bloom_sizing_(std::move(bloom_sizing)),
+      finished_(false),
+      written_count_(0) {
   CHECK(schema->has_column_ids());
 }
 
@@ -265,19 +265,18 @@ size_t DiskRowSetWriter::written_size() const {
 DiskRowSetWriter::~DiskRowSetWriter() {
 }
 
-RollingDiskRowSetWriter::RollingDiskRowSetWriter(TabletMetadata* tablet_metadata,
-                                                 const Schema &schema,
-                                                 const BloomFilterSizing &bloom_sizing,
-                                                 size_t target_rowset_size)
-  : state_(kInitialized),
-    tablet_metadata_(DCHECK_NOTNULL(tablet_metadata)),
-    schema_(schema),
-    bloom_sizing_(bloom_sizing),
-    target_rowset_size_(target_rowset_size),
-    row_idx_in_cur_drs_(0),
-    can_roll_(false),
-    written_count_(0),
-    written_size_(0) {
+RollingDiskRowSetWriter::RollingDiskRowSetWriter(
+    TabletMetadata* tablet_metadata, const Schema& schema,
+    BloomFilterSizing bloom_sizing, size_t target_rowset_size)
+    : state_(kInitialized),
+      tablet_metadata_(DCHECK_NOTNULL(tablet_metadata)),
+      schema_(schema),
+      bloom_sizing_(std::move(bloom_sizing)),
+      target_rowset_size_(target_rowset_size),
+      row_idx_in_cur_drs_(0),
+      can_roll_(false),
+      written_count_(0),
+      written_size_(0) {
   CHECK(schema.has_column_ids());
 }
 
@@ -463,14 +462,13 @@ Status DiskRowSet::Open(const shared_ptr<RowSetMetadata>& rowset_metadata,
   return Status::OK();
 }
 
-DiskRowSet::DiskRowSet(const shared_ptr<RowSetMetadata>& rowset_metadata,
+DiskRowSet::DiskRowSet(shared_ptr<RowSetMetadata> rowset_metadata,
                        LogAnchorRegistry* log_anchor_registry,
-                       const shared_ptr<MemTracker>& parent_tracker)
-  : rowset_metadata_(rowset_metadata),
-    open_(false),
-    log_anchor_registry_(log_anchor_registry),
-    parent_tracker_(parent_tracker) {
-}
+                       shared_ptr<MemTracker> parent_tracker)
+    : rowset_metadata_(std::move(rowset_metadata)),
+      open_(false),
+      log_anchor_registry_(log_anchor_registry),
+      parent_tracker_(std::move(parent_tracker)) {}
 
 Status DiskRowSet::Open() {
   TRACE_EVENT0("tablet", "DiskRowSet::Open");



Mime
View raw message