summaryrefslogtreecommitdiff
path: root/mysqlc
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2014-05-28 12:54:54 +0200
committerNoel Grandin <noel@peralex.com>2014-05-29 09:01:40 +0200
commit624a116d1482cdf0f9249e10a631dd6bd89f43eb (patch)
tree198f0392bd95ea3185210584e993340981be21c3 /mysqlc
parentebc0a15515c2e29259a7e229cfbdfb5d26fc3006 (diff)
use OUString::startsWith()
Change-Id: I0fc77b50792e48be175ab7cc151509e097676849
Diffstat (limited to 'mysqlc')
-rw-r--r--mysqlc/source/mysqlc_connection.cxx2
-rw-r--r--mysqlc/source/mysqlc_driver.cxx2
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:");
}
/* }}} */