Skip to content

Commit 1c794a7

Browse files
committed
Simplify db_target_descr_t constructor
1 parent 97bd724 commit 1c794a7

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

src/db-copy.hpp

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ struct db_target_descr_t
2222
std::string schema;
2323
/// Name of the target table for the copy operation.
2424
std::string name;
25-
/// Comma-separated list of rows for copy operation (when empty: all rows)
26-
std::string rows;
2725
/// Name of id column used when deleting objects.
2826
std::string id;
27+
/// Comma-separated list of rows for copy operation (when empty: all rows)
28+
std::string rows;
2929

3030
/**
3131
* Check if the buffer would use exactly the same copy operation.
@@ -38,12 +38,8 @@ struct db_target_descr_t
3838

3939
db_target_descr_t() = default;
4040

41-
db_target_descr_t(char const *n, char const *i, char const *r = "")
42-
: name(n), rows(r), id(i)
43-
{}
44-
45-
db_target_descr_t(std::string n, std::string i, std::string r)
46-
: name(std::move(n)), rows(std::move(r)), id(std::move(i))
41+
db_target_descr_t(std::string n, std::string i, std::string r = {})
42+
: name(std::move(n)), id(std::move(i)), rows(std::move(r))
4743
{}
4844
};
4945

0 commit comments

Comments
 (0)