mirror of
https://gitcode.com/gh_mirrors/hy/Hydro.git
synced 2026-10-20 01:38:19 +08:00
judge: redirect cpp to cc
This commit is contained in:
1 parent
f5226f154a
commit
c577165790
5 files changed
+5
-3
No files matched your search
@@ -235,6 +235,7 @@ export default class Hydro {
|
||||
|
||||
getLang(name: string) {
|
||||
if (this.language[name]) return this.language[name];
|
||||
if (name === 'cpp' && this.language.cc) return this.language.cc;
|
||||
throw new SystemError('Unsupported language {0}', [name]);
|
||||
}
|
||||
|
||||
|
||||
@@ -136,6 +136,7 @@ async function postInit() {
|
||||
|
||||
function getLang(lang: string) {
|
||||
if (setting.langs[lang]) return setting.langs[lang];
|
||||
if (lang === 'cpp' && setting.langs['cc']) return setting.langs['cc'];
|
||||
throw new SystemError('Unsupported language {0}.', [lang]);
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user