Use o3tl::make_unsigned, length is known to be non-negative
Change-Id: I2fac355230fd0c80016ca2259b8c6150e7160567 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/135323 Tested-by: Jenkins Reviewed-by: Stephan Bergmann <sbergman@redhat.com>
This commit is contained in:
parent
f6f19c7ac5
commit
875abc7774
1 changed files with 2 additions and 1 deletions
|
@ -62,6 +62,7 @@
|
|||
#include <com/sun/star/rdf/XMetadatable.hpp>
|
||||
#include <comphelper/sequence.hxx>
|
||||
#include <o3tl/any.hxx>
|
||||
#include <o3tl/safeint.hxx>
|
||||
#include <rtl/ustrbuf.hxx>
|
||||
#include <tools/debug.hxx>
|
||||
#include <rtl/math.hxx>
|
||||
|
@ -2853,7 +2854,7 @@ void XMLTextFieldExport::ExplodeFieldMasterName(
|
|||
size_t nSeparator = sMasterName.find('.', nLength);
|
||||
|
||||
// '.' found?
|
||||
if (static_cast<sal_Int32>(nSeparator) == nLength || nSeparator == std::u16string_view::npos) {
|
||||
if (nSeparator == o3tl::make_unsigned(nLength) || nSeparator == std::u16string_view::npos) {
|
||||
SAL_WARN("xmloff.text", "no field var name!");
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in a new issue