Skip to content

Commit 4233cf6

Browse files
committed
several warning fixed
1 parent 48ca52c commit 4233cf6

File tree

6 files changed

+8
-11
lines changed

6 files changed

+8
-11
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ cmake-build-debug/
88
/compile
99
build/
1010
build-xcode/
11+
build-code-edit/
1112
*.sqlite
1213
*.db

dev/conditions.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ namespace sqlite_orm {
3535
* Collated something
3636
*/
3737
template<class T>
38-
struct collate_t : public condition_t {
38+
struct collate_t : condition_t {
3939
T expr;
4040
collate_argument argument;
4141

dev/function.h

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -445,7 +445,6 @@ namespace sqlite_orm {
445445
[[nodiscard]] consteval auto quote(F callable) const {
446446
using Sig = function_signature_type_t<decltype(&F::operator())>;
447447
// detect whether overloaded call operator can be picked using `Sig`
448-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
449448
return quoted_scalar_function<F, Sig, N>{this->cstr, std::move(callable)};
450449
}
451450

@@ -456,7 +455,6 @@ namespace sqlite_orm {
456455
requires ((stateless<F> || std::copy_constructible<F>))
457456
[[nodiscard]] consteval auto quote(F callable) const {
458457
// detect whether overloaded call operator can be picked using `Sig`
459-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
460458
return quoted_scalar_function<F, Sig, N>{this->cstr, std::move(callable)};
461459
}
462460

@@ -477,7 +475,6 @@ namespace sqlite_orm {
477475
requires ((stateless<F> || std::copy_constructible<F>))
478476
[[nodiscard]] consteval auto quote(Args&&... constructorArgs) const {
479477
// detect whether overloaded call operator can be picked using `Sig`
480-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
481478
return quoted_scalar_function<F, Sig, N>{this->cstr, std::forward<Args>(constructorArgs)...};
482479
}
483480
};

dev/storage_base.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -765,7 +765,7 @@ namespace sqlite_orm {
765765
this->executor.perform_exec(
766766
connection.get(),
767767
ss.str(),
768-
[](void* data, int argc, orm_gsl::zstring* argv, orm_gsl::zstring* /*columnName*/) -> int {
768+
[](void* data, int /*argc*/, orm_gsl::zstring* argv, orm_gsl::zstring* /*columnName*/) -> int {
769769
auto& objectNames_ = *(data_t*)data;
770770
objectNames_.emplace_back(argv[0]);
771771
return 0;

include/sqlite_orm/sqlite_orm.h

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5159,7 +5159,7 @@ namespace sqlite_orm {
51595159
* Collated something
51605160
*/
51615161
template<class T>
5162-
struct collate_t : public condition_t {
5162+
struct collate_t : condition_t {
51635163
T expr;
51645164
collate_argument argument;
51655165

@@ -11515,7 +11515,6 @@ namespace sqlite_orm {
1151511515
[[nodiscard]] consteval auto quote(F callable) const {
1151611516
using Sig = function_signature_type_t<decltype(&F::operator())>;
1151711517
// detect whether overloaded call operator can be picked using `Sig`
11518-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
1151911518
return quoted_scalar_function<F, Sig, N>{this->cstr, std::move(callable)};
1152011519
}
1152111520

@@ -11526,7 +11525,6 @@ namespace sqlite_orm {
1152611525
requires ((stateless<F> || std::copy_constructible<F>))
1152711526
[[nodiscard]] consteval auto quote(F callable) const {
1152811527
// detect whether overloaded call operator can be picked using `Sig`
11529-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
1153011528
return quoted_scalar_function<F, Sig, N>{this->cstr, std::move(callable)};
1153111529
}
1153211530

@@ -11547,7 +11545,6 @@ namespace sqlite_orm {
1154711545
requires ((stateless<F> || std::copy_constructible<F>))
1154811546
[[nodiscard]] consteval auto quote(Args&&... constructorArgs) const {
1154911547
// detect whether overloaded call operator can be picked using `Sig`
11550-
using call_operator_type = decltype(static_cast<Sig F::*>(&F::operator()));
1155111548
return quoted_scalar_function<F, Sig, N>{this->cstr, std::forward<Args>(constructorArgs)...};
1155211549
}
1155311550
};
@@ -18813,7 +18810,7 @@ namespace sqlite_orm {
1881318810
this->executor.perform_exec(
1881418811
connection.get(),
1881518812
ss.str(),
18816-
[](void* data, int argc, orm_gsl::zstring* argv, orm_gsl::zstring* /*columnName*/) -> int {
18813+
[](void* data, int /*argc*/, orm_gsl::zstring* argv, orm_gsl::zstring* /*columnName*/) -> int {
1881718814
auto& objectNames_ = *(data_t*)data;
1881818815
objectNames_.emplace_back(argv[0]);
1881918816
return 0;

tests/tests3.cpp

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,8 @@ TEST_CASE("Blob") {
297297
return data;
298298
};
299299

300-
auto storage = make_storage("blob.db", make_table("blob", make_column("data", &BlobData::data)));
300+
auto filename = "blob.db";
301+
auto storage = make_storage(filename, make_table("blob", make_column("data", &BlobData::data)));
301302
storage.sync_schema();
302303
storage.remove_all<BlobData>();
303304

@@ -340,6 +341,7 @@ TEST_CASE("Blob") {
340341
storage.insert(BlobData{});
341342

342343
free(data);
344+
std::remove(filename);
343345
}
344346

345347
/**

0 commit comments

Comments
 (0)