From bd726dd4a2d3ffa41aa7a25415a31c32fb95a877 Mon Sep 17 00:00:00 2001 From: levlam Date: Tue, 24 Jul 2018 03:13:24 +0300 Subject: [PATCH] Fix warning. GitOrigin-RevId: 37d3ab8ee20d5fd4dc1e0b832847bd7effb19ff3 --- td/telegram/LanguagePackManager.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/td/telegram/LanguagePackManager.cpp b/td/telegram/LanguagePackManager.cpp index 5d7b0cd9..993efc8b 100644 --- a/td/telegram/LanguagePackManager.cpp +++ b/td/telegram/LanguagePackManager.cpp @@ -585,7 +585,7 @@ void LanguagePackManager::save_strings_to_database(Language *language, int32 new return; } - kv->begin_transaction(); + kv->begin_transaction().ensure(); for (auto str : strings) { if (!is_valid_key(str.first)) { LOG(ERROR) << "Have invalid key \"" << str.first << '"'; @@ -601,7 +601,7 @@ void LanguagePackManager::save_strings_to_database(Language *language, int32 new if (old_version != new_version) { kv->set("!version", to_string(new_version)); } - kv->commit_transaction(); + kv->commit_transaction().ensure(); } void LanguagePackManager::on_get_language_pack_strings(