diff options
author | Max Kellermann <max@duempel.org> | 2014-12-12 20:27:56 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2014-12-12 20:43:26 +0100 |
commit | 7dbe5f4640d95737b06063b0162184dc9f1978d0 (patch) | |
tree | 87c978cd4247c06298cefb913b16848774a5de91 /src/sticker | |
parent | 432ecd1b6a73962f17ac96c8133ced06b26f6a7e (diff) |
sticker/Database: remove redundant sqlite3_reset() calls
Call sqlite3_reset() only after a sqlite3_stmt* has been used, not
before. Assume it is already in reusable state.
Diffstat (limited to 'src/sticker')
-rw-r--r-- | src/sticker/StickerDatabase.cxx | 14 |
1 files changed, 0 insertions, 14 deletions
diff --git a/src/sticker/StickerDatabase.cxx b/src/sticker/StickerDatabase.cxx index 226579969..be806c036 100644 --- a/src/sticker/StickerDatabase.cxx +++ b/src/sticker/StickerDatabase.cxx @@ -212,8 +212,6 @@ sticker_load_value(const char *type, const char *uri, const char *name) if (*name == 0) return std::string(); - sqlite3_reset(stmt); - if (!BindAll(stmt, type, uri, name)) return std::string(); @@ -249,8 +247,6 @@ sticker_list_values(std::map<std::string, std::string> &table, assert(uri != nullptr); assert(sticker_enabled()); - sqlite3_reset(stmt); - if (!BindAll(stmt, type, uri)) return false; @@ -297,8 +293,6 @@ sticker_update_value(const char *type, const char *uri, assert(sticker_enabled()); - sqlite3_reset(stmt); - if (!BindAll(stmt, value, type, uri, name)) return false; @@ -335,8 +329,6 @@ sticker_insert_value(const char *type, const char *uri, assert(sticker_enabled()); - sqlite3_reset(stmt); - if (!BindAll(stmt, type, uri, name, value)) return false; @@ -384,8 +376,6 @@ sticker_delete(const char *type, const char *uri) assert(type != nullptr); assert(uri != nullptr); - sqlite3_reset(stmt); - if (!BindAll(stmt, type, uri)) return false; @@ -415,8 +405,6 @@ sticker_delete_value(const char *type, const char *uri, const char *name) assert(type != nullptr); assert(uri != nullptr); - sqlite3_reset(stmt); - if (!BindAll(stmt, type, uri, name)) return false; @@ -493,8 +481,6 @@ sticker_find(const char *type, const char *base_uri, const char *name, assert(func != nullptr); assert(sticker_enabled()); - sqlite3_reset(stmt); - if (base_uri == nullptr) base_uri = ""; |