Use a cheaper is-empty test for a C-string
We only need to look at the first byte to determine whether the length is > 0; no need to count how many more bytes after it aren't '\0'. Change-Id: Id2db2a9a993086c0aee02c99396fcb346b1a348e Reviewed-by: Mårten Nordheim <marten.nordheim@qt.io>bb10
parent
02d130db7e
commit
90406af31a
|
|
@ -157,7 +157,7 @@ void QTapTestLogger::addIncident(IncidentTypes type, const char *description,
|
|||
QTestCharBuffer directive;
|
||||
if (incident) {
|
||||
QTest::qt_asprintf(&directive, " # %s%s%s", incident,
|
||||
qstrlen(description) ? " " : "", description);
|
||||
description && description[0] ? " " : "", description);
|
||||
}
|
||||
|
||||
int testNumber = QTestLog::totalCount();
|
||||
|
|
|
|||
Loading…
Reference in New Issue