Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Commit

Permalink
Format code with clang-format
Browse files Browse the repository at this point in the history
  • Loading branch information
shuai132 committed Feb 1, 2023
1 parent 81e28bc commit 5e6ccf7
Show file tree
Hide file tree
Showing 8 changed files with 27 additions and 13 deletions.
10 changes: 6 additions & 4 deletions dev/column.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,8 +106,8 @@ namespace sqlite_orm {
struct column_t : column_identifier, column_field<G, S>, column_constraints<Op...> {
#ifndef SQLITE_ORM_AGGREGATE_BASES_SUPPORTED
column_t(std::string name, G memberPointer, S setter, std::tuple<Op...> op) :
column_identifier{std::move(name)}, column_field<G, S>{memberPointer, setter}, column_constraints<Op...>{
std::move(op)} {}
column_identifier{std::move(name)}, column_field<G, S>{memberPointer, setter},
column_constraints<Op...>{std::move(op)} {}
#endif
};

Expand Down Expand Up @@ -160,7 +160,8 @@ namespace sqlite_orm {
"Getter and setter must get and set same data type");
static_assert(polyfill::conjunction_v<internal::is_constraint<Op>...>, "Incorrect constraints pack");

SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(return {std::move(name), getter, setter, std::make_tuple(constraints...)});
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(
return {std::move(name), getter, setter, std::make_tuple(constraints...)});
}

/**
Expand All @@ -177,6 +178,7 @@ namespace sqlite_orm {
"Getter and setter must get and set same data type");
static_assert(polyfill::conjunction_v<internal::is_constraint<Op>...>, "Incorrect constraints pack");

SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(return {std::move(name), getter, setter, std::make_tuple(constraints...)});
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(
return {std::move(name), getter, setter, std::make_tuple(constraints...)});
}
}
4 changes: 3 additions & 1 deletion dev/conditions.h
Original file line number Diff line number Diff line change
Expand Up @@ -527,7 +527,9 @@ namespace sqlite_orm {
auto newContext = this->context;
newContext.skip_table_name = true;
auto columnName = serialize(order_by.expression, newContext);
this->entries.emplace_back(std::move(columnName), order_by.asc_desc, std::move(order_by._collate_argument));
this->entries.emplace_back(std::move(columnName),
order_by.asc_desc,
std::move(order_by._collate_argument));
}

const_iterator begin() const {
Expand Down
8 changes: 7 additions & 1 deletion dev/pragma.h
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,13 @@ namespace sqlite_orm {
++index;
auto pk = std::atoi(argv[index++]);
auto hidden = std::atoi(argv[index++]);
res.emplace_back(cid, std::move(name), std::move(type), notnull, std::move(dflt_value), pk, hidden);
res.emplace_back(cid,
std::move(name),
std::move(type),
notnull,
std::move(dflt_value),
pk,
hidden);
}
return 0;
},
Expand Down
3 changes: 2 additions & 1 deletion dev/select_constraints.h
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,8 @@ namespace sqlite_orm {
bool highest_level = false;

#ifndef SQLITE_ORM_AGGREGATE_NSDMI_SUPPORTED
select_t(return_type col, conditions_type conditions) : col{std::move(col)}, conditions{std::move(conditions)} {}
select_t(return_type col, conditions_type conditions) :
col{std::move(col)}, conditions{std::move(conditions)} {}
#endif
};

Expand Down
6 changes: 3 additions & 3 deletions dev/storage.h
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,8 @@ namespace sqlite_orm {

template<class S, class... Wargs>
void update_all(S set, Wargs... wh) {
static_assert(internal::is_set<S>::value, "first argument in update_all can be either set or dynamic_set");
static_assert(internal::is_set<S>::value,
"first argument in update_all can be either set or dynamic_set");
auto statement = this->prepare(sqlite_orm::update_all(std::move(set), std::forward<Wargs>(wh)...));
this->execute(statement);
}
Expand Down Expand Up @@ -1043,8 +1044,7 @@ namespace sqlite_orm {
#endif // SQLITE_ORM_OPTIONAL_SUPPORTED

template<class S, class... Wargs>
prepared_statement_t<update_all_t<S, Wargs...>>
prepare(update_all_t<S, Wargs...> upd) {
prepared_statement_t<update_all_t<S, Wargs...>> prepare(update_all_t<S, Wargs...> upd) {
return prepare_impl<update_all_t<S, Wargs...>>(std::move(upd));
}

Expand Down
3 changes: 2 additions & 1 deletion dev/table.h
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ namespace sqlite_orm {
elements_type elements;

#ifndef SQLITE_ORM_AGGREGATE_BASES_SUPPORTED
table_t(std::string name_, elements_type elements_) : basic_table{std::move(name_)}, elements{std::move(elements_)} {}
table_t(std::string name_, elements_type elements_) :
basic_table{std::move(name_)}, elements{std::move(elements_)} {}
#endif

table_t<T, true, Cs...> without_rowid() const {
Expand Down
3 changes: 2 additions & 1 deletion dev/table_info.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ namespace sqlite_orm {
decltype(dflt_value) dflt_value_,
decltype(pk) pk_) :
cid(cid_),
name(std::move(name_)), type(std::move(type_)), notnull(notnull_), dflt_value(std::move(dflt_value_)), pk(pk_) {}
name(std::move(name_)), type(std::move(type_)), notnull(notnull_), dflt_value(std::move(dflt_value_)),
pk(pk_) {}
#endif
};

Expand Down
3 changes: 2 additions & 1 deletion dev/triggers.h
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,8 @@ namespace sqlite_orm {

template<class T, class... S>
internal::trigger_t<T, S...> make_trigger(std::string name, const internal::partial_trigger_t<T, S...>& part) {
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(return {std::move(name), std::move(part.base), std::move(part.statements)});
SQLITE_ORM_CLANG_SUPPRESS_MISSING_BRACES(
return {std::move(name), std::move(part.base), std::move(part.statements)});
}

inline internal::trigger_timing_t before() {
Expand Down

0 comments on commit 5e6ccf7

Please sign in to comment.