Kaydet (Commit) 85966810 authored tarafından Noel Grandin's avatar Noel Grandin

clang-tidy bugprone-sizeof-expression

this was not really testing anything before, because it was doing
   sizeof(char*)
which is 4 or 8

Change-Id: I7eccdd3c6ae14a6fabb27202737fdb2fd12663dc
Reviewed-on: https://gerrit.libreoffice.org/60182
Tested-by: Jenkins
Reviewed-by: 's avatarNoel Grandin <noel.grandin@collabora.co.uk>
üst 2002bbe8
......@@ -155,7 +155,7 @@ public:
void test()
{
const char *sample = "Hello World";
const char sample[] = "Hello World";
std::vector<OUString> aStrings;
rtl_alloc_preInit(true);
......@@ -168,7 +168,7 @@ public:
for (int i = 1; i < 4096; i += 8)
{
OUStringBuffer aBuf(i);
aBuf.appendAscii(sample, (i/8) % (sizeof(sample)-1));
aBuf.appendAscii(sample, (i/8) % (SAL_N_ELEMENTS(sample)-1));
OUString aStr = aBuf.makeStringAndClear();
aStrings.push_back(aStr);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment