Skip to content

Commit cdc1ac9

Browse files
Update node_sqlite.cc
Co-authored-by: Anna Henningsen <github@addaleax.net>
1 parent d7ee60a commit cdc1ac9

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/node_sqlite.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,9 +161,9 @@ static constexpr std::array<LimitInfo, 11> kLimitMapping = {{
161161

162162
// Helper function to find limit ID from JS property name
163163
static int GetLimitIdFromName(const std::string& name) {
164-
for (size_t i = 0; i < kLimitMapping.size(); ++i) {
165-
if (name == kLimitMapping[i].js_name) {
166-
return kLimitMapping[i].sqlite_limit_id;
164+
for (const auto& [limit_name, id] : kLimitMapping) {
165+
if (name == limit_name) {
166+
return id;
167167
}
168168
}
169169
return -1; // Not found

0 commit comments

Comments
 (0)