Skip to content

Commit

Permalink
Inline exception class for avoiding C4275 link warning.
Browse files Browse the repository at this point in the history
  • Loading branch information
yangacer committed Jun 3, 2017
1 parent d23b6fe commit 61af40b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
5 changes: 0 additions & 5 deletions sqlite3cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -37,11 +37,6 @@

namespace sqlite3cpp {


char const *error::what() const noexcept {
return sqlite3_errstr(code);
}

/**
* row_iter impl
*/
Expand Down
6 changes: 4 additions & 2 deletions sqlite3cpp.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,9 +75,11 @@ struct aggregate;
C_STYLE_DELETER(sqlite3, sqlite3_close);
C_STYLE_DELETER(sqlite3_stmt, sqlite3_finalize);

struct SQLITE3CPP_EXPORT error : std::exception {
struct error : std::exception {
error(int code) noexcept : code(code) {}
char const *what() const noexcept;
char const *what() const noexcept {
return sqlite3_errstr(code);
}
int code;
};

Expand Down

0 comments on commit 61af40b

Please sign in to comment.