Remove unused ExtractVersionNum function
This commit is contained in:
@@ -11,30 +11,7 @@ namespace Flax.Build
|
||||
/// <seealso cref="Flax.Build.ProjectTarget" />
|
||||
public class EngineTarget : ProjectTarget
|
||||
{
|
||||
private static Version _engineVersion = null;
|
||||
|
||||
private static int ExtractVersionNum(string engineVersionContents, string token)
|
||||
{
|
||||
int tokenStartIndex = engineVersionContents.IndexOf(token, StringComparison.Ordinal);
|
||||
if (tokenStartIndex == -1)
|
||||
throw new Exception(string.Format("Missing version token {0} in the engine version config file.", token));
|
||||
int i = tokenStartIndex + token.Length;
|
||||
|
||||
while (i < engineVersionContents.Length && !char.IsNumber(engineVersionContents[i]))
|
||||
i++;
|
||||
|
||||
int startIndex = i;
|
||||
|
||||
while (i < engineVersionContents.Length && char.IsNumber(engineVersionContents[i]))
|
||||
i++;
|
||||
|
||||
if (i >= engineVersionContents.Length)
|
||||
throw new Exception(string.Format("Invalid version token {0} in the engine version config file.", token));
|
||||
|
||||
int endIndex = i;
|
||||
string value = engineVersionContents.Substring(startIndex, endIndex - startIndex);
|
||||
return int.Parse(value);
|
||||
}
|
||||
private static Version _engineVersion;
|
||||
|
||||
/// <summary>
|
||||
/// Gets the engine version (from Version.h in the engine source).
|
||||
|
||||
Reference in New Issue
Block a user