arrow-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From w...@apache.org
Subject arrow git commit: ARROW-1452: [C++] Restore DISALLOW_COPY_AND_ASSIGN usages removed in ARROW-1452 patch
Date Mon, 04 Sep 2017 17:31:22 GMT
Repository: arrow
Updated Branches:
  refs/heads/master cc3051262 -> f391950b8


ARROW-1452: [C++] Restore DISALLOW_COPY_AND_ASSIGN usages removed in ARROW-1452 patch

Also updated the definition of DISALLOW_COPY_AND_ASSIGN to use the one from Apache Kudu, which
has seen significantly more scrutiny than ours (https://github.com/apache/kudu/blob/master/src/kudu/gutil/macros.h#L96).

Author: Wes McKinney <wes.mckinney@twosigma.com>

Closes #1036 from wesm/ARROW-1452-followup and squashes the following commits:

bfab15bc [Wes McKinney] clang-format
75a95b9c [Wes McKinney] Restore DISALLOW_COPY_AND_ASSIGN usages removed in ARROW-1452 patch


Project: http://git-wip-us.apache.org/repos/asf/arrow/repo
Commit: http://git-wip-us.apache.org/repos/asf/arrow/commit/f391950b
Tree: http://git-wip-us.apache.org/repos/asf/arrow/tree/f391950b
Diff: http://git-wip-us.apache.org/repos/asf/arrow/diff/f391950b

Branch: refs/heads/master
Commit: f391950b8c9b52511d62fe82727cc5d98207e11d
Parents: cc30512
Author: Wes McKinney <wes.mckinney@twosigma.com>
Authored: Mon Sep 4 13:31:17 2017 -0400
Committer: Wes McKinney <wes.mckinney@twosigma.com>
Committed: Mon Sep 4 13:31:17 2017 -0400

----------------------------------------------------------------------
 cpp/src/arrow/array.h         | 3 +++
 cpp/src/arrow/io/interfaces.h | 3 +++
 cpp/src/arrow/type.h          | 3 +++
 cpp/src/arrow/util/macros.h   | 2 +-
 4 files changed, 10 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/arrow/blob/f391950b/cpp/src/arrow/array.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/array.h b/cpp/src/arrow/array.h
index 8052071..8e965e8 100644
--- a/cpp/src/arrow/array.h
+++ b/cpp/src/arrow/array.h
@@ -254,6 +254,9 @@ class ARROW_EXPORT Array {
     }
     data_ = data;
   }
+
+ private:
+  ARROW_DISALLOW_COPY_AND_ASSIGN(Array);
 };
 
 static inline std::ostream& operator<<(std::ostream& os, const Array& x)
{

http://git-wip-us.apache.org/repos/asf/arrow/blob/f391950b/cpp/src/arrow/io/interfaces.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/io/interfaces.h b/cpp/src/arrow/io/interfaces.h
index 59aed75..1144179 100644
--- a/cpp/src/arrow/io/interfaces.h
+++ b/cpp/src/arrow/io/interfaces.h
@@ -79,6 +79,9 @@ class ARROW_EXPORT FileInterface {
   FileInterface() {}
   FileMode::type mode_;
   void set_mode(FileMode::type mode) { mode_ = mode; }
+
+ private:
+  ARROW_DISALLOW_COPY_AND_ASSIGN(FileInterface);
 };
 
 class ARROW_EXPORT Seekable {

http://git-wip-us.apache.org/repos/asf/arrow/blob/f391950b/cpp/src/arrow/type.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/type.h b/cpp/src/arrow/type.h
index 3b7ef19..2a89423 100644
--- a/cpp/src/arrow/type.h
+++ b/cpp/src/arrow/type.h
@@ -157,6 +157,9 @@ class ARROW_EXPORT DataType {
  protected:
   Type::type id_;
   std::vector<std::shared_ptr<Field>> children_;
+
+ private:
+  ARROW_DISALLOW_COPY_AND_ASSIGN(DataType);
 };
 
 // TODO(wesm): Remove this from parquet-cpp

http://git-wip-us.apache.org/repos/asf/arrow/blob/f391950b/cpp/src/arrow/util/macros.h
----------------------------------------------------------------------
diff --git a/cpp/src/arrow/util/macros.h b/cpp/src/arrow/util/macros.h
index ec8d3bd..2f1db09 100644
--- a/cpp/src/arrow/util/macros.h
+++ b/cpp/src/arrow/util/macros.h
@@ -22,7 +22,7 @@
 #ifndef ARROW_DISALLOW_COPY_AND_ASSIGN
 #define ARROW_DISALLOW_COPY_AND_ASSIGN(TypeName) \
   TypeName(const TypeName&) = delete;            \
-  TypeName& operator=(const TypeName&) = delete
+  void operator=(const TypeName&) = delete
 #endif
 
 #define ARROW_UNUSED(x) (void)x


Mime
View raw message