diff options
| author | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-05-30 14:27:29 +0900 |
|---|---|---|
| committer | Michele Calgaro <michele.calgaro@yahoo.it> | 2025-06-25 16:43:08 +0900 |
| commit | 35ced32e331ee29fda1642616c803637952f5b22 (patch) | |
| tree | da44726777f814e19c7ef1e43854f6a1693dd6fb /tools/designer/editor/parenmatcher.cpp | |
| parent | 7dd4848d61e4c52091d6c644356c84c67536bde2 (diff) | |
| download | tqt-35ced32e.tar.gz tqt-35ced32e.zip | |
Replace TRUE/FALSE with boolean values true/false - part 1
Signed-off-by: Michele Calgaro <michele.calgaro@yahoo.it>
(cherry picked from commit a7f1e6e2552d9cdbb3d76bff089db522248b9a24)
Diffstat (limited to 'tools/designer/editor/parenmatcher.cpp')
| -rw-r--r-- | tools/designer/editor/parenmatcher.cpp | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tools/designer/editor/parenmatcher.cpp b/tools/designer/editor/parenmatcher.cpp index ddc4b8838..efb6a215a 100644 --- a/tools/designer/editor/parenmatcher.cpp +++ b/tools/designer/editor/parenmatcher.cpp @@ -40,18 +40,18 @@ ParenMatcher::ParenMatcher() { - enabled = TRUE; + enabled = true; } bool ParenMatcher::match( TQTextCursor *cursor ) { if ( !enabled ) - return FALSE; - bool ret = FALSE; + return false; + bool ret = false; TQChar c( cursor->paragraph()->at( cursor->index() )->c ); - bool ok1 = FALSE; - bool ok2 = FALSE; + bool ok1 = false; + bool ok2 = false; if ( c == '{' || c == '(' || c == '[' ) { ok1 = checkOpenParen( cursor ); ret = ok1 || ret; @@ -69,7 +69,7 @@ bool ParenMatcher::match( TQTextCursor *cursor ) bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) { if ( !cursor->paragraph()->extraData() ) - return FALSE; + return false; ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList; Paren openParen, closedParen; @@ -77,7 +77,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) int i = 0; int ignore = 0; - bool foundOpen = FALSE; + bool foundOpen = false; TQChar c = cursor->paragraph()->at( cursor->index() )->c; for (;;) { if ( !foundOpen ) { @@ -88,7 +88,7 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) ++i; continue; } else { - foundOpen = TRUE; + foundOpen = true; ++i; } } @@ -132,18 +132,18 @@ bool ParenMatcher::checkOpenParen( TQTextCursor *cursor ) cursor->document()->setSelectionEnd( id, *cursor ); cursor->setParagraph( tstring ); cursor->setIndex( tidx ); - return TRUE; + return true; } } bye: - return FALSE; + return false; } bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) { if ( !cursor->paragraph()->extraData() ) - return FALSE; + return false; ParenList parenList = ( (ParagData*)cursor->paragraph()->extraData() )->parenList; Paren openParen, closedParen; @@ -151,7 +151,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) int i = (int)parenList.count() - 1; int ignore = 0; - bool foundClosed = FALSE; + bool foundClosed = false; TQChar c = cursor->paragraph()->at( cursor->index() - 1 )->c; for (;;) { if ( !foundClosed ) { @@ -162,7 +162,7 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) --i; continue; } else { - foundClosed = TRUE; + foundClosed = true; --i; } } @@ -206,10 +206,10 @@ bool ParenMatcher::checkClosedParen( TQTextCursor *cursor ) cursor->document()->setSelectionEnd( id, *cursor ); cursor->setParagraph( tstring ); cursor->setIndex( tidx ); - return TRUE; + return true; } } bye: - return FALSE; + return false; } |
