Skip to content

Commit 9b1e7af

Browse files
committed
refactor event part validation
1 parent fa2c2b8 commit 9b1e7af

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

source/gameanalytics/GAValidator.cpp

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -461,17 +461,12 @@ namespace gameanalytics
461461
{
462462
constexpr uint32_t MAX_SIZE = 64u;
463463

464-
size_t size = eventPart.length();
465-
if (allowNull == true && size == 0)
464+
if (eventPart.empty())
466465
{
467-
return true;
468-
}
469-
470-
if (size == 0)
471-
{
472-
return false;
466+
return allowNull;
473467
}
474468

469+
size_t size = eventPart.length();
475470
if (size > MAX_SIZE)
476471
{
477472
return false;

0 commit comments

Comments
 (0)