Skip to content

Commit 2ea2002

Browse files
committed
Fix comments from PR
1 parent 7de0785 commit 2ea2002

File tree

2 files changed

+10
-10
lines changed

2 files changed

+10
-10
lines changed

hdr/sqlite_modern_cpp.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -449,8 +449,8 @@ namespace sqlite {
449449
return sqlite3_last_insert_rowid(_db.get());
450450
}
451451

452-
sqlite3_int64 rows_modified() const {
453-
return sqlite3_changes(_db.get());
452+
int rows_modified() const {
453+
return sqlite3_changes(_db.get());
454454
}
455455

456456
template <typename Function>

tests/simple_examples.cc

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
#include <cstdio>
33
#include <cstdlib>
44
#include <sqlite_modern_cpp.h>
5-
using namespace sqlite;
5+
using namespace sqlite;
66
using namespace std;
77

88
int main()
@@ -24,23 +24,23 @@ int main()
2424
exit(EXIT_FAILURE);
2525
}
2626

27-
std::string sql("select 1+1");
27+
string sql("select 1+1");
2828
long test = 0;
2929
db << sql >> test;
3030

3131
if(test != 2) exit(EXIT_FAILURE);
3232

33-
db <<"UPDATE foo SET b=? WHERE a=?;"<<"hi" << 1L ;
34-
db << "SELECT b from foo where a=?;" << 1L >> str;
33+
db << "UPDATE foo SET b=? WHERE a=?;" << "hi" << 1L;
34+
db << "SELECT b FROM foo WHERE a=?;" << 1L >> str;
3535
if(str != "hi")
3636
{
37-
cout << "Bad result on line " << __LINE__ << endl;
37+
cout << "Bad result on line " << __LINE__ << endl;
3838
exit(EXIT_FAILURE);
3939
}
40-
if(db.rows_modified()!=1) exit(EXIT_FAILURE);
40+
if(db.rows_modified() != 1) exit(EXIT_FAILURE);
4141

42-
db <<"UPDATE foo SET b=?;"<<"hello world" ;
43-
if(db.rows_modified()!=2) exit(EXIT_FAILURE);
42+
db << "UPDATE foo SET b=?;" << "hello world";
43+
if(db.rows_modified() != 2) exit(EXIT_FAILURE);
4444

4545
}
4646
catch(sqlite_exception e)

0 commit comments

Comments
 (0)