src/miscallenous.cc

changeset 800
a1d9b7fff8f7
parent 799
c18c8846f6a7
child 817
cee9f0ecac66
--- a/src/miscallenous.cc	Sat Jun 14 09:56:07 2014 +0300
+++ b/src/miscallenous.cc	Sat Jun 14 09:58:58 2014 +0300
@@ -138,38 +138,6 @@
 
 // =============================================================================
 //
-bool numeric (const QString& tok)
-{
-	bool gotDot = false;
-
-	for (int i = 0; i < tok.length(); ++i)
-	{
-		const QChar c = tok[i];
-
-		// Allow leading hyphen for negatives
-		if (i == 0 && c == '-')
-			continue;
-
-		// Check for decimal point
-		if (not gotDot && c == '.')
-		{
-			gotDot = true;
-			continue;
-		}
-
-		if (c >= '0' && c <= '9')
-			continue; // Digit
-
-		// If the above cases didn't catch this character, it was
-		// illegal and this is therefore not a number.
-		return false;
-	}
-
-	return true;
-}
-
-// =============================================================================
-//
 void simplify (int& numer, int& denom)
 {
 	bool repeat;

mercurial