Remove unused property Version in Converter

The property Version on the Parser class was never used. Removed it and
the command line argument in main that was used to set it.
This commit is contained in:
Fraser Waters 2017-07-02 23:03:34 +01:00
parent cfda55cd8a
commit be5712d85b
2 changed files with 2 additions and 8 deletions

View file

@ -68,15 +68,12 @@ namespace OpenTK.Convert
{
bool showHelp = false;
string prefix = "gl";
string version = null;
string path = null;
OptionSet opts = new OptionSet
{
{ "p=", "The {PREFIX} to remove from parsed functions and constants. " +
"Defaults to \"" + prefix + "\".",
v => prefix = v },
{ "v:", "The {VERSION} of the specification being parsed.",
v => version = v },
{ "o:", "The {PATH} to the output file.",
v => path = v },
{ "?|h|help", "Show this message and exit.",
@ -86,7 +83,7 @@ namespace OpenTK.Convert
var app = Path.GetFileName(Environment.GetCommandLineArgs()[0]);
if (showHelp)
{
Console.WriteLine("usage: {0} -p:PREFIX -v:VERSION SPECIFICATIONS", app);
Console.WriteLine("usage: {0} -p:PREFIX SPECIFICATIONS", app);
Console.WriteLine();
Console.WriteLine("Options:");
opts.WriteOptionDescriptions(Console.Out);
@ -101,7 +98,7 @@ namespace OpenTK.Convert
return;
}
Parser parser = new GLXmlParser { Prefix = prefix, Version = version };
Parser parser = new GLXmlParser { Prefix = prefix };
var sigs = headers.Select(h => parser.Parse(h)).ToList();

View file

@ -33,9 +33,6 @@ namespace OpenTK.Convert
{
// Defines a prefix that should be removed from methods and tokens in the XML files, e.g. "gl", "cl", etc.
public string Prefix { get; set; }
// Defines the version of the spec files (optional).
public string Version { get; set; }
// Implements the parsing logic for a specific input file.
public abstract IEnumerable<XElement> Parse(string[] lines);