Commit a2ac42b9 authored by Albert Astals Cid's avatar Albert Astals Cid
Browse files

CI: Enable modernize-use-bool-literals

parent 6b80bc9f
Pipeline #12080 passed with stage
in 11 minutes and 21 seconds
......@@ -32,4 +32,4 @@ build_clang_tidy:
- mkdir -p build && cd build
- CC=clang CXX=clang++ cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -G Ninja ..
- ninja
- "run-clang-tidy -header-filter='.*' -checks='-*,modernize-redundant-void-arg' -config=\"{WarningsAsErrors: '*'}\""
- "run-clang-tidy -header-filter='.*' -checks='-*,modernize-redundant-void-arg,modernize-use-bool-literals' -config=\"{WarningsAsErrors: '*'}\""
......@@ -1859,7 +1859,7 @@ void DocumentPrivate::doContinueAllDocumentSearch(void *pagesToNotifySet, void *
// loop on a page adding highlights for all found items
RegularAreaRect * lastMatch = nullptr;
while ( 1 )
while ( true )
{
if ( lastMatch )
lastMatch = page->findText( searchID, search->cachedString, NextResult, search->cachedCaseSensitivity, lastMatch );
......@@ -1967,7 +1967,7 @@ void DocumentPrivate::doContinueGooglesDocumentSearch(void *pagesToNotifySet, vo
RegularAreaRect * lastMatch = nullptr;
// add all highlights for current word
bool wordMatched = false;
while ( 1 )
while ( true )
{
if ( lastMatch )
lastMatch = page->findText( searchID, word, NextResult, search->cachedCaseSensitivity, lastMatch );
......@@ -2962,7 +2962,7 @@ bool Document::canConfigurePrinter( ) const
return iface ? true : false;
}
else
return 0;
return false;
}
DocumentInfo Document::documentInfo() const
......
......@@ -435,7 +435,7 @@ g31expand(pagenode *pn, drawfunc df)
for (EOLcnt = 1; !EndOfData(pn); EOLcnt++) {
/* we have seen 11 zeros, which implies EOL,
skip possible fill bits too */
while (1) {
while (true) {
NeedBits(8);
if (GetBits(8))
break;
......@@ -524,7 +524,7 @@ g32expand(pagenode *pn, drawfunc df)
for (EOLcnt = 1; !EndOfData(pn); EOLcnt++) {
/* we have seen 11 zeros, which implies EOL,
skip possible fill bits too */
while (1) {
while (true) {
NeedBits(8);
if (GetBits(8))
break;
......
......@@ -100,7 +100,7 @@ static int ReadConfigFile
status = 1; /* optimistic */
line_number = 0;
while (1) {
while (true) {
ptr = fgets (linebuf, sizeof (linebuf) - 1, fp);
if (ptr == NULL)
......
......@@ -45,7 +45,7 @@ void GSRendererThread::addRequest(const GSRendererThreadRequest &req)
void GSRendererThread::run()
{
while(1)
while(true)
{
m_semaphore.acquire();
{
......
......@@ -196,7 +196,7 @@ void DocumentItem::searchText(const QString &text)
}
m_document->cancelSearch();
m_document->resetSearch(PAGEVIEW_SEARCH_ID);
m_document->searchText(PAGEVIEW_SEARCH_ID, text, 1, Qt::CaseInsensitive,
m_document->searchText(PAGEVIEW_SEARCH_ID, text, true, Qt::CaseInsensitive,
Okular::Document::AllDocument, true, QColor(100,100,200,40));
if (!m_searchInProgress) {
......
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