diff options
Diffstat (limited to 'unoidl/source/sourceprovider-parser.y')
-rw-r--r-- | unoidl/source/sourceprovider-parser.y | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/unoidl/source/sourceprovider-parser.y b/unoidl/source/sourceprovider-parser.y index 6512e4a69d64..8f813c3a6c45 100644 --- a/unoidl/source/sourceprovider-parser.y +++ b/unoidl/source/sourceprovider-parser.y @@ -261,9 +261,7 @@ unoidl::detail::SourceProviderEntity * findEntity_( assert(data != 0); assert(name != 0); OUString n; - if (name->startsWith(".")) { - n = name->copy(1); - } else { + if (!name->startsWith(".", &n)) { for (std::vector<OUString>::const_reverse_iterator i(data->modules.rbegin()); i != data->modules.rend(); ++i) { @@ -345,7 +343,7 @@ Found findEntity( static_cast<unoidl::TypedefEntity *>(e->entity.get()) ->getType()); typeNucleus = t; - while (typeNucleus.startsWith("[]")) { + while (typeNucleus.startsWith("[]", &typeNucleus)) { if (!args.empty()) { error( location, yyscanner, @@ -363,7 +361,6 @@ Found findEntity( return FOUND_ERROR; } ++rank; - typeNucleus = typeNucleus.copy(2); } sal_Int32 i = typeNucleus.indexOf('<'); if (i != -1) { |