diff options
author | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-12-09 21:26:59 +0100 |
---|---|---|
committer | Matteo Casalin <matteo.casalin@yahoo.com> | 2018-12-28 17:03:58 +0100 |
commit | 86daabed8b36820e6c6e3a48f8221aadec2c81a3 (patch) | |
tree | e516ac7e774e521626009308be8fd53a5c1e14be | |
parent | 217ec9aba798777ccab58f2382a1d0592f15249f (diff) |
Use indexed getToken()
Change-Id: I30c4a26a5873beca4c0ba88040174dd7b6b8ece4
Reviewed-on: https://gerrit.libreoffice.org/65671
Tested-by: Jenkins
Reviewed-by: Matteo Casalin <matteo.casalin@yahoo.com>
-rw-r--r-- | connectivity/source/drivers/hsqldb/HDriver.cxx | 12 |
1 files changed, 7 insertions, 5 deletions
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 ) ) |