Skip to content

Commit

Permalink
Deglobalize default threshold value, and fix initialization of thresh…
Browse files Browse the repository at this point in the history
…old variable.
  • Loading branch information
AndrejMitrovic committed Jun 24, 2013
1 parent f85bd54 commit 8e4ef6a
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions std/net/isemail.d
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ EmailStatus isEmail (Char) (const(Char)[] email, CheckDns checkDNS = CheckDns.no
{
alias const(Char)[] tstring;

enum defaultThreshold = 16;
int threshold;
bool diagnose;

Expand All @@ -84,7 +85,7 @@ EmailStatus isEmail (Char) (const(Char)[] email, CheckDns checkDNS = CheckDns.no

switch (errorLevel)
{
case EmailStatusCode.warning: threshold = threshold; break;
case EmailStatusCode.warning: threshold = defaultThreshold; break;
case EmailStatusCode.error: threshold = EmailStatusCode.valid; break;
default: threshold = errorLevel;
}
Expand Down Expand Up @@ -1670,8 +1671,6 @@ enum EmailStatusCode

private:

enum threshold = 16;

// Email parts for the isEmail function
enum EmailPart
{
Expand Down

0 comments on commit 8e4ef6a

Please sign in to comment.