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