Skip to content

Commit e5104a2

Browse files
committed
Merge pull request #23 from unphased/gcc-cast-warning
suppresses a warning somewhat
2 parents 5bdfac8 + 501cba5 commit e5104a2

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ template<> inline void get_col_from_db(database_binder& db, int inx,std::string
452452
s = std::string();
453453
} else {
454454
sqlite3_column_bytes(db._stmt, inx);
455-
s = std::string((char*)sqlite3_column_text(db._stmt, inx));
455+
s = std::string(reinterpret_cast<char const *>(sqlite3_column_text(db._stmt, inx)));
456456
}
457457
}
458458
template<> inline database_binder&& operator <<(database_binder&& db, std::string const&& txt) {
@@ -470,7 +470,7 @@ template<> inline void get_col_from_db(database_binder& db, int inx, std::u16str
470470
w = std::u16string();
471471
} else {
472472
sqlite3_column_bytes16(db._stmt, inx);
473-
w = std::u16string((char16_t *)sqlite3_column_text16(db._stmt, inx));
473+
w = std::u16string(reinterpret_cast<char16_t const *>(sqlite3_column_text16(db._stmt, inx)));
474474
}
475475
}
476476
template<> inline database_binder&& operator <<(database_binder&& db, std::u16string const&& txt) {

0 commit comments

Comments
 (0)