From 85913b4afcee5ff0b0fa7d375ae735615b03b53d Mon Sep 17 00:00:00 2001 From: Edward Welbourne Date: Fri, 15 Jun 2018 11:35:00 +0200 Subject: [PATCH] Tidy-up after recent change: combine declaration with initializer MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I94420a3dfa30e4a2a4d8786621bea1dd9309bed8 Reviewed-by: MÃ¥rten Nordheim Reviewed-by: Thiago Macieira --- src/corelib/tools/qtimezoneprivate_android.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/corelib/tools/qtimezoneprivate_android.cpp b/src/corelib/tools/qtimezoneprivate_android.cpp index b60093617f..be4f374fdd 100644 --- a/src/corelib/tools/qtimezoneprivate_android.cpp +++ b/src/corelib/tools/qtimezoneprivate_android.cpp @@ -85,10 +85,9 @@ void QAndroidTimeZonePrivate::init(const QByteArray &ianaId) // Painfully, JNI gives us back a default zone object if it doesn't // recognize the name; so check for whether ianaId is a recognized name of // the zone object we got and ignore the zone if not. - bool found = false; // Try checking ianaId against getID(), getDisplayName(): QJNIObjectPrivate jname = androidTimeZone.callObjectMethod("getID", "()Ljava/lang/String;"); - found = (jname.toString().toUtf8() == ianaId); + bool found = (jname.toString().toUtf8() == ianaId); for (int style = 1; !found && style-- > 0;) { for (int dst = 1; !found && dst-- > 0;) { jname = androidTimeZone.callObjectMethod("getDisplayName", "(ZI;)Ljava/lang/String;",