Skip to content

Commit 6cae5fe

Browse files
committed
Fix compiler errors
1 parent 68e54ff commit 6cae5fe

2 files changed

Lines changed: 13 additions & 4 deletions

File tree

include/internal/common.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,18 @@ namespace csv {
259259
class lazy_shared_ptr {
260260
public:
261261
lazy_shared_ptr() = default;
262+
lazy_shared_ptr(const lazy_shared_ptr&) = delete;
263+
lazy_shared_ptr& operator=(const lazy_shared_ptr&) = delete;
264+
265+
lazy_shared_ptr(lazy_shared_ptr&& other) noexcept : value_(std::move(other.value_)) {}
266+
267+
lazy_shared_ptr& operator=(lazy_shared_ptr&& other) noexcept {
268+
if (this != &other) {
269+
value_ = std::move(other.value_);
270+
}
271+
272+
return *this;
273+
}
262274

263275
template<typename Factory>
264276
T& get_or_create(Factory&& factory) const {

include/internal/data_frame.hpp

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -68,14 +68,13 @@ namespace csv {
6868

6969
class DataFrameCell : public CSVField {
7070
public:
71-
DataFrameCell() : CSVField(csv::string_view()), row(nullptr), row_edits(nullptr), col_index(0), can_mutate(false) {}
71+
DataFrameCell() : CSVField(csv::string_view()), row_edits(nullptr), col_index(0), can_mutate(false) {}
7272

7373
DataFrameCell(
7474
const CSVRow* _row,
7575
std::unordered_map<size_t, std::string>* _row_edits,
7676
size_t _col_index
7777
) : CSVField(current_value(_row, _row_edits, _col_index)),
78-
row(_row),
7978
row_edits(_row_edits),
8079
col_index(_col_index),
8180
can_mutate(true) {}
@@ -85,7 +84,6 @@ namespace csv {
8584
const std::unordered_map<size_t, std::string>* _row_edits,
8685
size_t _col_index
8786
) : CSVField(current_value(_row, _row_edits, _col_index)),
88-
row(_row),
8987
row_edits(_row_edits),
9088
col_index(_col_index),
9189
can_mutate(false) {}
@@ -121,7 +119,6 @@ namespace csv {
121119
return *this;
122120
}
123121

124-
const CSVRow* row;
125122
const std::unordered_map<size_t, std::string>* row_edits;
126123
size_t col_index;
127124
bool can_mutate;

0 commit comments

Comments
 (0)