Commit 64962ef2 authored by Kurt Hindenburg's avatar Kurt Hindenburg

Correct bool/int usage readability-implicit-bool-cast

parent d1bdcc92
......@@ -267,7 +267,7 @@ void IncrementalSearchBar::focusLineEdit()
const QBitArray IncrementalSearchBar::optionsChecked()
{
QBitArray options(4, 0);
QBitArray options(4, false);
if (_caseSensitive->isChecked()) options.setBit(MatchCase);
if (_regExpression->isChecked()) options.setBit(RegExp);
......
......@@ -241,7 +241,7 @@ void Screen::insertLines(int n)
void Screen::setMode(int m)
{
_currentModes[m] = true;
_currentModes[m] = 1;
switch (m) {
case MODE_Origin :
_cuX = 0;
......@@ -252,7 +252,7 @@ void Screen::setMode(int m)
void Screen::resetMode(int m)
{
_currentModes[m] = false;
_currentModes[m] = 0;
switch (m) {
case MODE_Origin :
_cuX = 0;
......@@ -273,7 +273,7 @@ void Screen::restoreMode(int m)
bool Screen::getMode(int m) const
{
return _currentModes[m];
return _currentModes[m] != 0;
}
void Screen::saveCursor()
......@@ -511,8 +511,8 @@ void Screen::reset()
scrollUp(0, _cuY);
_cuY = 0;
_currentModes[MODE_Origin] = false;
_savedModes[MODE_Origin] = false;
_currentModes[MODE_Origin] = 0;
_savedModes[MODE_Origin] = 0;
setMode(MODE_Wrap);
saveMode(MODE_Wrap); // wrap at end of margin
......
......@@ -171,7 +171,7 @@ private:
public:
// Initializes all modes to false
TerminalState() {
memset(&mode, false, MODE_total * sizeof(bool));
memset(&mode, 0, MODE_total * sizeof(bool));
}
bool mode[MODE_total];
......
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