Skip to content

Commit 82333b9

Browse files
committed
Remove unnecessary cast
1 parent 9eeb279 commit 82333b9

1 file changed

Lines changed: 5 additions & 6 deletions

File tree

src/common/buffer/CellData.ts

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
* @license MIT
44
*/
55

6-
import { CharData, IAttributeData, ICellData, IExtendedAttrs } from 'common/Types';
6+
import { CharData, ICellData, IExtendedAttrs } from 'common/Types';
77
import { stringFromCodePoint } from 'common/input/TextDecoder';
88
import { CHAR_DATA_CHAR_INDEX, CHAR_DATA_WIDTH_INDEX, CHAR_DATA_ATTR_INDEX, Content } from 'common/buffer/Constants';
99
import { AttributeData, ExtendedAttrs } from 'common/buffer/AttributeData';
@@ -110,20 +110,19 @@ export class CellData extends AttributeData implements ICellData {
110110
return false;
111111
}
112112
if (this.isUnderline()) {
113-
const otherData = other as unknown as IAttributeData;
114-
if (this.getUnderlineStyle() !== otherData.getUnderlineStyle()) {
113+
if (this.getUnderlineStyle() !== other.getUnderlineStyle()) {
115114
return false;
116115
}
117116
const thisDefault = this.isUnderlineColorDefault();
118-
const otherDefault = otherData.isUnderlineColorDefault();
117+
const otherDefault = other.isUnderlineColorDefault();
119118
if (!(thisDefault && otherDefault)) {
120119
if (thisDefault !== otherDefault) {
121120
return false;
122121
}
123-
if (this.getUnderlineColor() !== otherData.getUnderlineColor()) {
122+
if (this.getUnderlineColor() !== other.getUnderlineColor()) {
124123
return false;
125124
}
126-
if (this.getUnderlineColorMode() !== otherData.getUnderlineColorMode()) {
125+
if (this.getUnderlineColorMode() !== other.getUnderlineColorMode()) {
127126
return false;
128127
}
129128
}

0 commit comments

Comments
 (0)