From be5712d85be160cb009784faf6b99c50ef9517dc Mon Sep 17 00:00:00 2001 From: Fraser Waters Date: Sun, 2 Jul 2017 23:03:34 +0100 Subject: [PATCH] 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. --- src/Generator.Converter/Main.cs | 7 ++----- src/Generator.Converter/Parser.cs | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/src/Generator.Converter/Main.cs b/src/Generator.Converter/Main.cs index 6ccdb10d..9f3dec20 100644 --- a/src/Generator.Converter/Main.cs +++ b/src/Generator.Converter/Main.cs @@ -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(); diff --git a/src/Generator.Converter/Parser.cs b/src/Generator.Converter/Parser.cs index 6f955cae..fe007ced 100644 --- a/src/Generator.Converter/Parser.cs +++ b/src/Generator.Converter/Parser.cs @@ -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 Parse(string[] lines);