File tree Expand file tree Collapse file tree 1 file changed +5
-7
lines changed
Expand file tree Collapse file tree 1 file changed +5
-7
lines changed Original file line number Diff line number Diff line change @@ -44,18 +44,16 @@ static_assert(kLimitMapping.size() ==
4444 static_cast <size_t >(SQLITE_LIMIT_TRIGGER_DEPTH + 1 ),
4545 " kLimitMapping must cover all SQLite limits" );
4646
47- constexpr bool CheckLimitBounds () {
48- for (const auto & info : kLimitMapping ) {
49- if (info.sqlite_limit_id < 0 ||
50- info.sqlite_limit_id > SQLITE_LIMIT_TRIGGER_DEPTH) {
47+ constexpr bool CheckLimitIndices () {
48+ for (size_t i = 0 ; i < kLimitMapping .size (); ++i) {
49+ if (kLimitMapping [i].sqlite_limit_id != static_cast <int >(i)) {
5150 return false ;
5251 }
5352 }
5453 return true ;
5554}
56- static_assert (
57- CheckLimitBounds (),
58- "All kLimitMapping entries must be <= SQLITE_LIMIT_TRIGGER_DEPTH");
55+ static_assert (CheckLimitIndices(),
56+ " Each kLimitMapping entry's sqlite_limit_id must match its index" );
5957
6058class DatabaseOpenConfiguration {
6159 public:
You can’t perform that action at this time.
0 commit comments