* Declare TStringSplitOptions with scopedenum (bug ID 29032)

git-svn-id: trunk@32730 -
This commit is contained in:
michael 2015-12-26 16:16:02 +00:00
parent 5ab123883a
commit 42804c935f
2 changed files with 4 additions and 2 deletions

View File

@ -1184,7 +1184,7 @@ begin
begin
T:=SubString(LastSep,Sep-LastSep);
// Writeln('Examining >',T,'< at pos,',LastSep,' till pos ',Sep);
If (T<>'') or (not (ExcludeEmpty=Options)) then
If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
begin
MaybeGrow(Len);
Result[Len]:=T;
@ -1267,7 +1267,7 @@ begin
While (Sep<>-1) and ((ACount=0) or (Len<ACount)) do
begin
T:=SubString(LastSep,Sep-LastSep);
If (T<>'') or (not (ExcludeEmpty=Options)) then
If (T<>'') or (not (TStringSplitOptions.ExcludeEmpty=Options)) then
begin
MaybeGrow(Len);
Result[Len]:=T;

View File

@ -31,7 +31,9 @@ Type
TCompareOption = system.TCompareOption;
TCompareOptions = system.TCompareOptions;
{$SCOPEDENUMS ON}
TStringSplitOptions = (None, ExcludeEmpty);
{$SCOPEDENUMS OFF}
{ TStringHelper }