Code cleanup.

This commit is contained in:
2022-11-21 18:16:12 +08:00
parent 145c0ce6c8
commit e5d6e549bd
8 changed files with 9 additions and 15 deletions

View File

@@ -275,7 +275,7 @@ namespace Cryville.Crtr {
private void LoadFromString(string s) {
Match m = Regex.Match(s, @"^(.+?)(#(\d+))?(@(.+?))?(\^(.+?))?(\*(.+?))?(:(.+))?$");
if (!m.Success) throw new ArgumentException(); // TODO
if (!m.Success) throw new ArgumentException("Invalid motion string format");
name = new Identifier(m.Groups[1].Value);
var registry = ChartPlayer.motionRegistry[name];
if (m.Groups[3].Success) {