Browse Source

cclasses.pas, TCmdStrList:
* if doubles are not allowed then do case sensitive checks instead of insensitive ones

git-svn-id: branches/svenbarth/packages@32450 -

svenbarth 9 years ago
parent
commit
44a7c89ed9
1 changed files with 4 additions and 4 deletions
  1. 4 4
      compiler/cclasses.pas

+ 4 - 4
compiler/cclasses.pas

@@ -401,7 +401,7 @@ type
        { string container }
        { string container }
        TCmdStrList = class(TLinkedList)
        TCmdStrList = class(TLinkedList)
        private
        private
-          FDoubles : boolean;  { if this is set to true, doubles are allowed }
+          FDoubles : boolean;  { if this is set to true, doubles (case insensitive!) are allowed }
        public
        public
           constructor Create;
           constructor Create;
           constructor Create_No_Double;
           constructor Create_No_Double;
@@ -2407,7 +2407,7 @@ end;
     procedure TCmdStrList.insert(const s : TCmdStr);
     procedure TCmdStrList.insert(const s : TCmdStr);
       begin
       begin
          if (s='') or
          if (s='') or
-            ((not FDoubles) and (find(s)<>nil)) then
+            ((not FDoubles) and (findcase(s)<>nil)) then
           exit;
           exit;
          inherited insert(TCmdStrListItem.create(s));
          inherited insert(TCmdStrListItem.create(s));
       end;
       end;
@@ -2416,7 +2416,7 @@ end;
     procedure TCmdStrList.concat(const s : TCmdStr);
     procedure TCmdStrList.concat(const s : TCmdStr);
       begin
       begin
          if (s='') or
          if (s='') or
-            ((not FDoubles) and (find(s)<>nil)) then
+            ((not FDoubles) and (findcase(s)<>nil)) then
           exit;
           exit;
          inherited concat(TCmdStrListItem.create(s));
          inherited concat(TCmdStrListItem.create(s));
       end;
       end;
@@ -2428,7 +2428,7 @@ end;
       begin
       begin
         if s='' then
         if s='' then
          exit;
          exit;
-        p:=find(s);
+        p:=findcase(s);
         if assigned(p) then
         if assigned(p) then
          begin
          begin
            inherited Remove(p);
            inherited Remove(p);