summaryrefslogtreecommitdiff
path: root/unotools
diff options
context:
space:
mode:
authorStephan Bergmann <sbergman@redhat.com>2016-11-29 17:17:48 +0100
committerStephan Bergmann <sbergman@redhat.com>2016-11-29 17:17:48 +0100
commit1c717c06c486155bf48aef3ed5e5c140f4205e6e (patch)
tree46311d98de837a5a50bab29e9a6a44c9f80cf1a7 /unotools
parent8b30c5228b9d2031e5bbd2511a3bbe5f760ce836 (diff)
Rewrite some (trivial) assignments inside if/while conditions: unotools
Change-Id: Iee52f5a3a815a782692a8ee962425ff2ab9173a8
Diffstat (limited to 'unotools')
-rw-r--r--unotools/source/misc/datetime.cxx5
1 files changed, 2 insertions, 3 deletions
diff --git a/unotools/source/misc/datetime.cxx b/unotools/source/misc/datetime.cxx
index bbe74057603a..b3623ccfffe5 100644
--- a/unotools/source/misc/datetime.cxx
+++ b/unotools/source/misc/datetime.cxx
@@ -342,8 +342,6 @@ bool ISO8601parseDate(const OUString &aDateStr, css::util::Date& rDate)
/** convert ISO8601 Time String to util::Time */
bool ISO8601parseTime(const OUString &aTimeStr, css::util::Time& rTime)
{
- bool bSuccess = true;
-
sal_Int32 nHour = 0;
sal_Int32 nMin = 0;
sal_Int32 nSec = 0;
@@ -355,7 +353,8 @@ bool ISO8601parseTime(const OUString &aTimeStr, css::util::Time& rTime)
OUString tokTz;
bool bFrac = false;
// hours
- if (bSuccess && (bSuccess = getISO8601TimeToken(aTimeStr, n, tokInt, bFrac, tokFrac)))
+ bool bSuccess = getISO8601TimeToken(aTimeStr, n, tokInt, bFrac, tokFrac);
+ if (bSuccess)
{
if ( bFrac && n < aTimeStr.getLength())
// is it junk or the timezone?