Skip to content

Commit 1f0bb47

Browse files
committed
Small formatting fixes
1 parent 8327ea6 commit 1f0bb47

File tree

3 files changed

+5
-8
lines changed

3 files changed

+5
-8
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ int main() {
3030
// binds the fields to '?' .
3131
// note that only types allowed for bindings are :
3232
// int ,long, long long, float, double
33-
// string , u16string
33+
// string, u16string
3434
// sqlite3 only supports utf8 and utf16 strings, you should use std::string for utf8 and std::u16string for utf16.
35-
// If you're using c++17, it takes `string_view` and `u16string_view` as arguments
35+
// If you're using C++17, `std::string_view` and `std::u16string_view` can be used as string types.
3636
// note that u"my text" is a utf16 string literal of type char16_t * .
3737
db << "insert into user (age,name,weight) values (?,?,?);"
3838
<< 20

hdr/sqlite_modern_cpp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ namespace sqlite {
105105

106106
public:
107107

108-
database_binder(std::shared_ptr<sqlite3> db, u16str_ref sql):
108+
database_binder(std::shared_ptr<sqlite3> db, u16str_ref sql):
109109
_db(db),
110110
_stmt(_prepare(sql), sqlite3_finalize),
111111
_inx(0) {

tests/string_view.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
#include <iostream>
2-
#include <cstdlib>
31
#include <sqlite_modern_cpp.h>
42
#include <catch.hpp>
53

@@ -8,9 +6,8 @@
86
#include <string_view>
97

108
using namespace sqlite;
11-
using namespace std;
129
TEST_CASE("std::string_view works", "[string_view]") {
13-
database db(":memory:");;
10+
database db(":memory:");
1411
db << "CREATE TABLE foo (a integer, b string);\n";
1512
const std::string_view test1 = "null terminated string view";
1613
db << "INSERT INTO foo VALUES (?, ?)" << 1 << test1;
@@ -23,4 +20,4 @@ TEST_CASE("std::string_view works", "[string_view]") {
2320
db << "SELECT b from FOO where a=?" << 2 >> str;
2421
REQUIRE(str == "he");
2522
}
26-
#endif
23+
#endif

0 commit comments

Comments
 (0)