@@ -12,8 +12,7 @@ namespace pandas {
12
12
// Array
13
13
14
14
Array::Array (const std::shared_ptr<DataType>& type, int64_t length)
15
- : type_(type),
16
- length_ (length) {}
15
+ : type_(type), length_(length) {}
17
16
18
17
Status Array::Copy (std::shared_ptr<Array>* out) const {
19
18
return Copy (0 , length_, out);
@@ -23,23 +22,17 @@ Status Array::Copy(std::shared_ptr<Array>* out) const {
23
22
// ArrayView
24
23
25
24
ArrayView::ArrayView (const std::shared_ptr<Array>& data)
26
- : data_(data),
27
- offset_(0 ),
28
- length_(data->length ()) {}
25
+ : data_(data), offset_(0 ), length_(data->length ()) {}
29
26
30
27
ArrayView::ArrayView (const std::shared_ptr<Array>& data, int64_t offset)
31
- : data_(data),
32
- offset_(offset),
33
- length_(data->length () - offset) {
28
+ : data_(data), offset_(offset), length_(data->length () - offset) {
34
29
// Debugging sanity checks
35
30
PANDAS_DCHECK_GE (offset, 0 );
36
31
PANDAS_DCHECK_LT (offset, data->length ());
37
32
}
38
33
39
34
ArrayView::ArrayView (const std::shared_ptr<Array>& data, int64_t offset, int64_t length)
40
- : data_(data),
41
- offset_(offset),
42
- length_(length) {
35
+ : data_(data), offset_(offset), length_(length) {
43
36
// Debugging sanity checks
44
37
PANDAS_DCHECK_GE (offset, 0 );
45
38
PANDAS_DCHECK_LT (offset, data->length ());
@@ -49,15 +42,11 @@ ArrayView::ArrayView(const std::shared_ptr<Array>& data, int64_t offset, int64_t
49
42
50
43
// Copy ctor
51
44
ArrayView::ArrayView (const ArrayView& other)
52
- : data_(other.data_),
53
- offset_(other.offset_),
54
- length_(other.length_) {}
45
+ : data_(other.data_), offset_(other.offset_), length_(other.length_) {}
55
46
56
47
// Move ctor
57
48
ArrayView::ArrayView (ArrayView&& other)
58
- : data_(std::move(other.data_)),
59
- offset_(other.offset_),
60
- length_(other.length_) {}
49
+ : data_(std::move(other.data_)), offset_(other.offset_), length_(other.length_) {}
61
50
62
51
// Copy assignment
63
52
ArrayView& ArrayView::operator =(const ArrayView& other) {
@@ -97,4 +86,4 @@ int64_t ArrayView::ref_count() const {
97
86
return data_.use_count ();
98
87
}
99
88
100
- } // namespace pandas
89
+ } // namespace pandas
0 commit comments