From 1e2a70d2bc8de4fa64ef2a09e560b616c71e9f7a Mon Sep 17 00:00:00 2001 From: Kurt Hindenburg Date: Sat, 30 Dec 2017 11:36:51 -0500 Subject: [PATCH] old style cast -> static_cast --- src/Profile.cpp | 2 +- src/Screen.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/Profile.cpp b/src/Profile.cpp index 5b317b34..fab384d6 100644 --- a/src/Profile.cpp +++ b/src/Profile.cpp @@ -124,7 +124,7 @@ const Profile::PropertyInfo Profile::DefaultPropertyNames[] = { // Encoding , { DefaultEncoding , "DefaultEncoding" , ENCODING_GROUP , QVariant::String } - , { (Property)0 , nullptr , nullptr, QVariant::Invalid } + , { static_cast(0) , nullptr , nullptr, QVariant::Invalid } }; QHash Profile::PropertyInfoByName; diff --git a/src/Screen.cpp b/src/Screen.cpp index 87f3e6b0..04ea1372 100644 --- a/src/Screen.cpp +++ b/src/Screen.cpp @@ -486,7 +486,7 @@ QVector Screen::getLineProperties(int startLine , int endLine) con for (int line = startLine; line < startLine + linesInHistory; line++) { //TODO Support for line properties other than wrapped _lines if (_history->isWrappedLine(line)) { - result[index] = (LineProperty)(result[index] | LINE_WRAPPED); + result[index] = static_cast(result[index] | LINE_WRAPPED); } index++; } @@ -668,7 +668,7 @@ void Screen::displayCharacter(unsigned short c) if (_cuX + w > _columns) { if (getMode(MODE_Wrap)) { - _lineProperties[_cuY] = (LineProperty)(_lineProperties[_cuY] | LINE_WRAPPED); + _lineProperties[_cuY] = static_cast(_lineProperties[_cuY] | LINE_WRAPPED); nextLine(); } else { _cuX = _columns - w; @@ -1386,9 +1386,9 @@ const HistoryType& Screen::getScroll() const void Screen::setLineProperty(LineProperty property , bool enable) { if (enable) - _lineProperties[_cuY] = (LineProperty)(_lineProperties[_cuY] | property); + _lineProperties[_cuY] = static_cast(_lineProperties[_cuY] | property); else - _lineProperties[_cuY] = (LineProperty)(_lineProperties[_cuY] & ~property); + _lineProperties[_cuY] = static_cast(_lineProperties[_cuY] & ~property); } void Screen::fillWithDefaultChar(Character* dest, int count) {