Kaydet (Commit) 86daabed authored tarafından Matteo Casalin's avatar Matteo Casalin

Use indexed getToken()

Change-Id: I30c4a26a5873beca4c0ba88040174dd7b6b8ece4
Reviewed-on: https://gerrit.libreoffice.org/65671
Tested-by: Jenkins
Reviewed-by: 's avatarMatteo Casalin <matteo.casalin@yahoo.com>
üst 217ec9ab
......@@ -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 ) )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment