Skip to content

Commit

Permalink
Merge pull request #410 from MichaelChirico/patch-1
Browse files Browse the repository at this point in the history
- Prefer `empty()` over `size() == 0` (#410, @MichaelChirico).
  • Loading branch information
krlmlr authored Mar 23, 2022
2 parents 04bc86a + f6a6a68 commit 9233030
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/DbColumn.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ void DbColumn::warn_type_conflicts(const String& name) const {
my_data_types_seen.erase(DT_BOOL);
my_data_types_seen.erase(dt);

if (my_data_types_seen.size() == 0) return;
if (my_data_types_seen.empty()) return;

String name_utf8 = name;
name_utf8.set_encoding(CE_UTF8);
Expand Down
2 changes: 1 addition & 1 deletion src/DbConnection.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ DbConnection::DbConnection(const std::string& path, const bool allow_ext, const
busy_callback_(NULL) {

// Get the underlying database connection
int rc = sqlite3_open_v2(path.c_str(), &pConn_, flags, vfs.size() ? vfs.c_str() : NULL);
int rc = sqlite3_open_v2(path.c_str(), &pConn_, flags, vfs.empty() ? NULL : vfs.c_str());
if (rc != SQLITE_OK) {
stop("Could not connect to database:\n%s", getException());
}
Expand Down

0 comments on commit 9233030

Please sign in to comment.