less code in utility
This commit is contained in:
@@ -33,10 +33,7 @@ namespace OpenRA.Utility
|
|||||||
|
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
var action = Exts.WithDefault( null, () => actions[args[0]]);
|
var action = Exts.WithDefault( _ => PrintUsage(), () => actions[args[0]]);
|
||||||
if (action == null)
|
|
||||||
PrintUsage();
|
|
||||||
else
|
|
||||||
action(args);
|
action(args);
|
||||||
}
|
}
|
||||||
catch( Exception e )
|
catch( Exception e )
|
||||||
|
|||||||
Reference in New Issue
Block a user