connectivity/source/drivers/hsqldb/HDriver.cxx |   12 +++++++-----
 1 file changed, 7 insertions(+), 5 deletions(-)

New commits:
commit 86daabed8b36820e6c6e3a48f8221aadec2c81a3
Author:     Matteo Casalin <matteo.casa...@yahoo.com>
AuthorDate: Sun Dec 9 21:26:59 2018 +0100
Commit:     Matteo Casalin <matteo.casa...@yahoo.com>
CommitDate: Fri Dec 28 17:03:58 2018 +0100

    Use indexed getToken()
    
    Change-Id: I30c4a26a5873beca4c0ba88040174dd7b6b8ece4
    Reviewed-on: https://gerrit.libreoffice.org/65671
    Tested-by: Jenkins
    Reviewed-by: Matteo Casalin <matteo.casa...@yahoo.com>

diff --git a/connectivity/source/drivers/hsqldb/HDriver.cxx 
b/connectivity/source/drivers/hsqldb/HDriver.cxx
index be2d1040c8dc..a6ee1e714b62 100644
--- a/connectivity/source/drivers/hsqldb/HDriver.cxx
+++ b/connectivity/source/drivers/hsqldb/HDriver.cxx
@@ -266,8 +266,9 @@ namespace connectivity
                                 {
                                     if ( sLine.isEmpty() )
                                         continue;
-                                    const OString sIniKey = sLine.getToken(0, 
'=');
-                                    const OString sValue = sLine.getToken(1, 
'=');
+                                    sal_Int32 nIdx {0};
+                                    const OString sIniKey = sLine.getToken(0, 
'=', nIdx);
+                                    const OString sValue = sLine.getToken(0, 
'=', nIdx);
                                     if( sIniKey == "hsqldb.compatible_version" 
)
                                     {
                                         sVersionString = sValue;
@@ -282,9 +283,10 @@ namespace connectivity
                                 }
                                 if (!sVersionString.isEmpty())
                                 {
-                                    const sal_Int32 nMajor = 
sVersionString.getToken(0, '.').toInt32();
-                                    const sal_Int32 nMinor = 
sVersionString.getToken(1, '.').toInt32();
-                                    const sal_Int32 nMicro = 
sVersionString.getToken(2, '.').toInt32();
+                                    sal_Int32 nIdx {0};
+                                    const sal_Int32 nMajor = 
sVersionString.getToken(0, '.', nIdx).toInt32();
+                                    const sal_Int32 nMinor = 
sVersionString.getToken(0, '.', nIdx).toInt32();
+                                    const sal_Int32 nMicro = 
sVersionString.getToken(0, '.', nIdx).toInt32();
                                     if (     nMajor > 1
                                         || ( nMajor == 1 && nMinor > 8 )
                                         || ( nMajor == 1 && nMinor == 8 && 
nMicro > 0 ) )
_______________________________________________
Libreoffice-commits mailing list
libreoffice-comm...@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits

Reply via email to