summaryrefslogtreecommitdiff
path: root/codemaker/source/codemaker/exceptiontree.cxx
diff options
context:
space:
mode:
authorMike Kaganski <mike.kaganski@collabora.com>2019-04-04 12:27:22 +0300
committerMike Kaganski <mike.kaganski@collabora.com>2019-04-04 20:36:11 +0200
commit84662e9030a855c8db7cd40d9ce354b773d78c16 (patch)
tree1c83da4320267f2bc17493e3b528ef388cb9c0ac /codemaker/source/codemaker/exceptiontree.cxx
parent3c6c56b107d71d5f4790be0b76299e8f215f88cc (diff)
Get rid of b2u/u2b helpers; use OUString's toUtf8/fromUtf8 instead
These helpers are used in code generator code; so any invalid UTF-8 or UTF-16 in the conversion is programmer's error which needs fixing. Thus, the behavior of toUtf8/fromUtf8 which asserts the validity is fine here. Change-Id: I3004e233c9de59f8e348455f1f04d23e8c51ed3d Reviewed-on: https://gerrit.libreoffice.org/70249 Tested-by: Jenkins Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Reviewed-by: Mike Kaganski <mike.kaganski@collabora.com>
Diffstat (limited to 'codemaker/source/codemaker/exceptiontree.cxx')
-rw-r--r--codemaker/source/codemaker/exceptiontree.cxx6
1 files changed, 2 insertions, 4 deletions
diff --git a/codemaker/source/codemaker/exceptiontree.cxx b/codemaker/source/codemaker/exceptiontree.cxx
index b6c2aeee6f87..796f52671ce3 100644
--- a/codemaker/source/codemaker/exceptiontree.cxx
+++ b/codemaker/source/codemaker/exceptiontree.cxx
@@ -55,12 +55,10 @@ void ExceptionTree::add(
}
list.push_back(n);
rtl::Reference< unoidl::Entity > ent;
- codemaker::UnoType::Sort s = manager->getSort(b2u(n), &ent);
+ codemaker::UnoType::Sort s = manager->getSort(OUString::fromUtf8(n), &ent);
(void) s; // WaE: unused variable
assert(s == codemaker::UnoType::Sort::Exception);
- n = u2b(
- static_cast< unoidl::ExceptionTypeEntity * >(ent.get())->
- getDirectBase());
+ n = static_cast<unoidl::ExceptionTypeEntity*>(ent.get())->getDirectBase().toUtf8();
assert(!n.isEmpty());
}
if (!bRuntimeException) {