From 7dbe5f4640d95737b06063b0162184dc9f1978d0 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 12 Dec 2014 20:27:56 +0100 Subject: 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. --- src/sticker/StickerDatabase.cxx | 14 -------------- 1 file changed, 14 deletions(-) (limited to 'src/sticker') 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 &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 = ""; -- cgit v1.2.3