فهرست منبع

* 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 }