MCPcopy Create free account
hub / github.com/compiler-explorer/compiler-explorer / updateCompilersFor

Method updateCompilersFor

static/panes/diff.ts:570–582  ·  view source on GitHub ↗
(selectize: TomSelect, id: number | string)

Source from the content-addressed store, hash-verified

568 }
569
570 updateCompilersFor(selectize: TomSelect, id: number | string) {
571 selectize.clearOptions();
572 for (const [_, compiler] of Object.entries(this.compilers)) {
573 const optionId = compiler.id.toString();
574 selectize.addOption(compiler);
575 selectize.updateOption(optionId, compiler);
576 }
577 selectize.refreshOptions(false);
578 const selectedId = id.toString();
579 if (selectedId in this.compilers) {
580 selectize.setValue(selectedId);
581 }
582 }
583
584 updateCompilers() {
585 if (this.lhs.id) this.updateCompilersFor(this.selectize.lhs, this.lhs.id);

Callers 1

updateCompilersMethod · 0.95

Calls 1

toStringMethod · 0.80

Tested by

no test coverage detected