diff options
author | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-22 20:21:01 +0100 |
---|---|---|
committer | Caolán McNamara <caolan.mcnamara@collabora.com> | 2024-09-23 09:32:54 +0200 |
commit | 08964038e1432bcda91de1a7e5454ab4e8b114a8 (patch) | |
tree | 83709efe06cc426f19849c1d9d63156294f06356 /unodevtools/source | |
parent | dcde476695d287d836e74a1cb5cc42379aa6a469 (diff) |
cid#1607989 Overflowed constant
and
cid#1607976 Overflowed constant
cid#1607855 Overflowed constant
cid#1607731 Overflowed constant
Change-Id: I18e8ffb8a9b5a55e0ecb71862549a94ff5c2fc1a
Reviewed-on: https://gerrit.libreoffice.org/c/core/+/173781
Tested-by: Jenkins
Reviewed-by: Caolán McNamara <caolan.mcnamara@collabora.com>
Diffstat (limited to 'unodevtools/source')
-rw-r--r-- | unodevtools/source/skeletonmaker/cpptypemaker.cxx | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/unodevtools/source/skeletonmaker/cpptypemaker.cxx b/unodevtools/source/skeletonmaker/cpptypemaker.cxx index 1423f2739a5b..5432957b9e86 100644 --- a/unodevtools/source/skeletonmaker/cpptypemaker.cxx +++ b/unodevtools/source/skeletonmaker/cpptypemaker.cxx @@ -68,7 +68,9 @@ static void printType( if (sort == codemaker::UnoType::Sort::Enum) { auto pEnumTypeEntity(dynamic_cast<unoidl::EnumTypeEntity *>(entity.get())); assert(pEnumTypeEntity); - o << OUString(nucleus.substr(nucleus.rfind('.') + 1)) << "_" + const std::string_view::size_type nLastDot = nucleus.rfind('.'); + const auto nAfterDot = (nLastDot != std::string_view::npos) ? (nLastDot + 1) : 0; + o << OUString(nucleus.substr(nAfterDot)) << "_" << pEnumTypeEntity->getMembers()[0].name; } return; |