old style cast -> static_cast

wilder-portage
Kurt Hindenburg 8 years ago
parent 38e886007d
commit 1e2a70d2bc
  1. 2
      src/Profile.cpp
  2. 8
      src/Screen.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<Profile::Property>(0) , nullptr , nullptr, QVariant::Invalid }
};
QHash<QString, Profile::PropertyInfo> Profile::PropertyInfoByName;

@ -486,7 +486,7 @@ QVector<LineProperty> 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<LineProperty>(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<LineProperty>(_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<LineProperty>(_lineProperties[_cuY] | property);
else
_lineProperties[_cuY] = (LineProperty)(_lineProperties[_cuY] & ~property);
_lineProperties[_cuY] = static_cast<LineProperty>(_lineProperties[_cuY] & ~property);
}
void Screen::fillWithDefaultChar(Character* dest, int count)
{

Loading…
Cancel
Save