replace NULL and avoid ai_assert with more than 2 tests.

This commit is contained in:
Kim Kulling
2020-06-23 21:05:42 +02:00
659 changed files with 30283 additions and 48642 deletions

View File

@@ -55,7 +55,9 @@ void CommentRemover::RemoveLineComments(const char* szComment,
char* szBuffer, char chReplacement /* = ' ' */)
{
// validate parameters
ai_assert(NULL != szComment && NULL != szBuffer && *szComment);
ai_assert(nullptr != szComment);
ai_assert(nullptr != szBuffer);
ai_assert(*szComment);
const size_t len = strlen(szComment);
while (*szBuffer) {
@@ -83,8 +85,11 @@ void CommentRemover::RemoveMultiLineComments(const char* szCommentStart,
char chReplacement)
{
// validate parameters
ai_assert(NULL != szCommentStart && NULL != szCommentEnd &&
NULL != szBuffer && *szCommentStart && *szCommentEnd);
ai_assert(nullptr != szCommentStart);
ai_assert(nullptr != szCommentEnd);
ai_assert(nullptr != szBuffer);
ai_assert(*szCommentStart);
ai_assert(*szCommentEnd);
const size_t len = strlen(szCommentEnd);
const size_t len2 = strlen(szCommentStart);