From fe7f17f422096dfb1dc8ed75843faac24f532a5c Mon Sep 17 00:00:00 2001 From: tisilent Date: Tue, 22 Aug 2023 09:26:01 +0800 Subject: [PATCH] clean --- addons/xterm-addon-webgl/src/GlyphRenderer.ts | 6 +++--- src/common/MultiKeyMap.ts | 19 ------------------- 2 files changed, 3 insertions(+), 22 deletions(-) diff --git a/addons/xterm-addon-webgl/src/GlyphRenderer.ts b/addons/xterm-addon-webgl/src/GlyphRenderer.ts index cd204a1f..269d9374 100644 --- a/addons/xterm-addon-webgl/src/GlyphRenderer.ts +++ b/addons/xterm-addon-webgl/src/GlyphRenderer.ts @@ -215,15 +215,15 @@ export class GlyphRenderer extends Disposable { } @traceCall - public updateCell(x: number, y: number, code: number, bg: number, fg: number, ext: number, chars: string, lastBg: number, variantOffset: number): void { + public updateCell(x: number, y: number, code: number, bg: number, fg: number, ext: number, chars: string, lastBg: number): void { // Since this function is called for every cell (`rows*cols`), it must be very optimized. It // should not instantiate any variables unless a new glyph is drawn to the cache where the // slight slowdown is acceptable for the developer ergonomics provided as it's a once of for // each glyph. - this._updateCell(this._vertices.attributes, x, y, code, bg, fg, ext, chars, lastBg, variantOffset); + this._updateCell(this._vertices.attributes, x, y, code, bg, fg, ext, chars, lastBg); } - private _updateCell(array: Float32Array, x: number, y: number, code: number | undefined, bg: number, fg: number, ext: number, chars: string, lastBg: number, variantOffset: number): void { + private _updateCell(array: Float32Array, x: number, y: number, code: number | undefined, bg: number, fg: number, ext: number, chars: string, lastBg: number): void { $i = (y * this._terminal.cols + x) * INDICES_PER_CELL; // Exit early if this is a null character, allow space character to continue as it may have diff --git a/src/common/MultiKeyMap.ts b/src/common/MultiKeyMap.ts index edd5abb5..6287a8f2 100644 --- a/src/common/MultiKeyMap.ts +++ b/src/common/MultiKeyMap.ts @@ -40,22 +40,3 @@ export class FourKeyMap { - private _data: { [bg: string | number]: FourKeyMap | undefined } = {}; - - public set(first: TFirst, second: TSecond, third: TThird, fourth: TFourth, five: TFive, value: TValue): void { - if (!this._data[first]) { - this._data[first] = new FourKeyMap(); - } - this._data[first as string | number]!.set(second, third, fourth, five, value); - } - - public get(first: TFirst, second: TSecond, third: TThird, fourth: TFourth, five: TFive): TValue | undefined { - return this._data[first as string | number] ? this._data[first as string | number]?.get(second, third, fourth, five) : undefined; - } - - public clear(): void { - this._data = {}; - } -}