diff options
author | Noel Grandin <noel@peralex.com> | 2014-05-28 12:54:54 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2014-05-29 09:01:40 +0200 |
commit | 624a116d1482cdf0f9249e10a631dd6bd89f43eb (patch) | |
tree | 198f0392bd95ea3185210584e993340981be21c3 /mysqlc/source | |
parent | ebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (diff) |
use OUString::startsWith()
Change-Id: I0fc77b50792e48be175ab7cc151509e097676849
Diffstat (limited to 'mysqlc/source')
-rw-r--r-- | mysqlc/source/mysqlc_connection.cxx | 2 | ||||
-rw-r--r-- | mysqlc/source/mysqlc_driver.cxx | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/mysqlc/source/mysqlc_connection.cxx b/mysqlc/source/mysqlc_connection.cxx index c3643faa045f..9c0b1831c28f 100644 --- a/mysqlc/source/mysqlc_connection.cxx +++ b/mysqlc/source/mysqlc_connection.cxx @@ -118,7 +118,7 @@ void OConnection::construct(const OUString& url, const Sequence< PropertyValue > // parse url. Url has the following format: // external server: sdbc:mysqlc:[hostname]:[port]/[dbname] - if (!url.compareTo(OUString(MYSQLC_URI_PREFIX), sizeof(MYSQLC_URI_PREFIX)-1)) { + if (url.startsWith(MYSQLC_URI_PREFIX)) { nIndex = 12; } else { bEmbedded = sal_True; diff --git a/mysqlc/source/mysqlc_driver.cxx b/mysqlc/source/mysqlc_driver.cxx index 343949dfe920..be6d927c99fc 100644 --- a/mysqlc/source/mysqlc_driver.cxx +++ b/mysqlc/source/mysqlc_driver.cxx @@ -243,7 +243,7 @@ sal_Bool SAL_CALL MysqlCDriver::acceptsURL(const OUString& url) throw(SQLException, RuntimeException, std::exception) { OSL_TRACE("MysqlCDriver::acceptsURL"); - return (!url.compareTo(OUString("sdbc:mysqlc:"), sizeof("sdbc:mysqlc:")-1)); + return url.startsWith("sdbc:mysqlc:"); } /* }}} */ |