Uploaded image for project: 'Thrift'
  1. Thrift
  2. THRIFT-4461

Compiler directive should match Delphi XE4

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 0.11.0
    • Fix Version/s: 0.12.0
    • Component/s: Delphi - Library
    • Labels:
    • Environment:

      Delphi XE3

    • Patch Info:
      Patch Available

      Description

      In module Thrift.Utils daclared two methods

       

       class function CharUtils.IsHighSurrogate( const c : Char) : Boolean;
       begin
         {$IF CompilerVersion < 23.0}
         result := Character.IsHighSurrogate( c);
         {$ELSE}
         result := c.IsHighSurrogate();
         {$IFEND}
       end;
      
       class function CharUtils.IsLowSurrogate( const c : Char) : Boolean;
       begin
         {$IF CompilerVersion < 23.0}
         result := Character.IsLowSurrogate( c);
         {$ELSE}
         result := c.IsLowSurrogate;
         {$IFEND}
       end; 
      

      But methods Char.IsHighSurrogate()/Char.IsLowSurrogate() **appeared in Delphi XE4. For Delphi XE4 variable CompilerVersion equal 25.

      In this way condition

      {$IF CompilerVersion < 23.0}

      may be changed to

      {$IF CompilerVersion < 25.0}

      And access for unit Character may be determined through defiine symbol OLD_UNIT_NAMES

        Attachments

        1. Thrift.Utils.diff
          0.9 kB
          Anton Shchyrov

          Activity

            People

            • Assignee:
              jensg Jens Geyer
              Reporter:
              AntonTramp Anton Shchyrov
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: