silence compiler warning

This commit is contained in:
Kovid Goyal 2021-06-16 21:38:32 +05:30
parent 9e77e2848e
commit 22af8ab304
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C

View File

@ -197,7 +197,7 @@ tok_create(void *sqlite3, const char **azArg, int nArg, Fts5Tokenizer **ppOut) {
rc = p->constructor_error;
delete p;
}
} catch (std::bad_alloc) {
} catch (std::bad_alloc const&) {
return SQLITE_NOMEM;
} catch (...) {
return SQLITE_ERROR;
@ -210,7 +210,7 @@ tok_tokenize(Fts5Tokenizer *tokenizer_ptr, void *callback_ctx, int flags, const
Tokenizer *p = reinterpret_cast<Tokenizer*>(tokenizer_ptr);
try {
return p->tokenize(callback_ctx, flags, text, text_sz, callback);
} catch (std::bad_alloc) {
} catch (std::bad_alloc const&) {
return SQLITE_NOMEM;
} catch (...) {
return SQLITE_ERROR;