[Libreoffice-commits] core.git: connectivity/source

Caolán McNamara (via logerrit) logerrit at kemper.freedesktop.org
Wed Sep 29 10:22:55 UTC 2021


 connectivity/source/commontools/dbconversion.cxx |    9 +++------
 1 file changed, 3 insertions(+), 6 deletions(-)

New commits:
commit 057a74c2f20256c34e97dae246e6e1867a364b84
Author:     Caolán McNamara <caolanm at redhat.com>
AuthorDate: Wed Sep 29 09:30:42 2021 +0100
Commit:     Caolán McNamara <caolanm at redhat.com>
CommitDate: Wed Sep 29 12:22:22 2021 +0200

    this scoping detracts from readability
    
    Change-Id: I99a51bf68ef1c98e4023413b9274c4361f8a9b96
    Reviewed-on: https://gerrit.libreoffice.org/c/core/+/122797
    Tested-by: Jenkins
    Reviewed-by: Caolán McNamara <caolanm at redhat.com>

diff --git a/connectivity/source/commontools/dbconversion.cxx b/connectivity/source/commontools/dbconversion.cxx
index cae8470479c3..6a2e21191fa4 100644
--- a/connectivity/source/commontools/dbconversion.cxx
+++ b/connectivity/source/commontools/dbconversion.cxx
@@ -333,12 +333,9 @@ namespace dbtools
     css::util::Time DBTypeConversion::toTime(const double dVal, short nDigits)
     {
         const double nDays = std::trunc(dVal);
-        sal_Int64 nNS;
-        {
-            double fSeconds((dVal - nDays) * (fNanoSecondsPerDay / nanoSecInSec));
-            fSeconds = ::rtl::math::round( fSeconds, nDigits );
-            nNS = fSeconds * nanoSecInSec;
-        }
+        double fSeconds((dVal - nDays) * (fNanoSecondsPerDay / nanoSecInSec));
+        fSeconds = ::rtl::math::round(fSeconds, nDigits);
+        sal_Int64 nNS = fSeconds * nanoSecInSec;
 
         sal_Int16 nSign;
         if ( nNS < 0 )


More information about the Libreoffice-commits mailing list