diff options
author | Stephan Bergmann <sbergman@redhat.com> | 2016-03-10 17:11:10 +0100 |
---|---|---|
committer | Andras Timar <andras.timar@collabora.com> | 2016-07-13 21:38:16 +0200 |
commit | 20d00043469901f55fb2f54a774035dfcd559dce (patch) | |
tree | 387a26d49be126b017581af245c824bc104f985b /jvmfwk/source | |
parent | edebc88629bea1bcfc64705c196ac7f8aa658d31 (diff) |
Turn JavaInfo rtl_uString* members into OUString
Change-Id: Ieb23b0c36ef56a4793a56cdb450df34e4d9bce1d
(cherry picked from commit 5dcdb35ab1e99dbeb283d3694ab7ebba354e9197)
Diffstat (limited to 'jvmfwk/source')
-rw-r--r-- | jvmfwk/source/elements.cxx | 9 | ||||
-rw-r--r-- | jvmfwk/source/framework.cxx | 20 |
2 files changed, 8 insertions, 21 deletions
diff --git a/jvmfwk/source/elements.cxx b/jvmfwk/source/elements.cxx index 9e2f9901a6f9..afd9a7b3b665 100644 --- a/jvmfwk/source/elements.cxx +++ b/jvmfwk/source/elements.cxx @@ -979,12 +979,9 @@ JavaInfo * CNodeJavaInfo::makeJavaInfo() const return nullptr; JavaInfo * pInfo = new JavaInfo; memset(pInfo, 0, sizeof(JavaInfo)); - pInfo->sVendor = sVendor.pData; - rtl_uString_acquire(pInfo->sVendor); - pInfo->sLocation = sLocation.pData; - rtl_uString_acquire(pInfo->sLocation); - pInfo->sVersion = sVersion.pData; - rtl_uString_acquire(pInfo->sVersion); + pInfo->sVendor = sVendor; + pInfo->sLocation = sLocation; + pInfo->sVersion = sVersion; pInfo->nFeatures = nFeatures; pInfo->nRequirements = nRequirements; pInfo->arVendorData = arVendorData.getHandle(); diff --git a/jvmfwk/source/framework.cxx b/jvmfwk/source/framework.cxx index 3c8725ff3bea..fec33d52e31e 100644 --- a/jvmfwk/source/framework.cxx +++ b/jvmfwk/source/framework.cxx @@ -631,13 +631,10 @@ bool SAL_CALL jfw_areEqualJavaInfo( return true; if (pInfoA == nullptr || pInfoB == nullptr) return false; - OUString sVendor(pInfoA->sVendor); - OUString sLocation(pInfoA->sLocation); - OUString sVersion(pInfoA->sVersion); rtl::ByteSequence sData(pInfoA->arVendorData); - if (sVendor.equals(pInfoB->sVendor) - && sLocation.equals(pInfoB->sLocation) - && sVersion.equals(pInfoB->sVersion) + if (pInfoA->sVendor == pInfoB->sVendor + && pInfoA->sLocation == pInfoB->sLocation + && pInfoA->sVersion == pInfoB->sVersion && pInfoA->nFeatures == pInfoB->nFeatures && pInfoA->nRequirements == pInfoB->nRequirements && sData == pInfoB->arVendorData) @@ -652,9 +649,6 @@ void SAL_CALL jfw_freeJavaInfo(JavaInfo *pInfo) { if (pInfo == nullptr) return; - rtl_uString_release(pInfo->sVendor); - rtl_uString_release(pInfo->sLocation); - rtl_uString_release(pInfo->sVersion); rtl_byte_sequence_release(pInfo->arVendorData); delete pInfo; } @@ -1083,12 +1077,8 @@ JavaInfo * CJavaInfo::copyJavaInfo(const JavaInfo * pInfo) { if (pInfo == nullptr) return nullptr; - JavaInfo* newInfo = new JavaInfo; - memcpy(newInfo, pInfo, sizeof(JavaInfo)); - rtl_uString_acquire(pInfo->sVendor); - rtl_uString_acquire(pInfo->sLocation); - rtl_uString_acquire(pInfo->sVersion); - rtl_byte_sequence_acquire(pInfo->arVendorData); + JavaInfo* newInfo = new JavaInfo(*pInfo); + rtl_byte_sequence_acquire(newInfo->arVendorData); return newInfo; } |