Преглед на файлове

* Declare TStringSplitOptions with scopedenum (bug ID 29032)

git-svn-id: trunk@32730 -
michael преди 9 години
родител
ревизия
42804c935f
променени са 2 файла, в които са добавени 4 реда и са изтрити 2 реда
  1. 2 2
      rtl/objpas/sysutils/syshelp.inc
  2. 2 0
      rtl/objpas/sysutils/syshelph.inc

+ 2 - 2
rtl/objpas/sysutils/syshelp.inc

@@ -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;

+ 2 - 0
rtl/objpas/sysutils/syshelph.inc

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