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

improved Delphi const generation

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.9.2
    • Delphi - Compiler
    • None
    • Patch Available

    Description

      Currently, all constants are rendered as

        TConstants = class
        private
          class var FmyInt: TmyIntType;
          class var Fhex_const: Integer;
          class var FGEN_ME: Integer;
          class var FGEn_DU: Double;
          // ...
        public
          class property myInt: TmyIntType read FmyInt;
          class property hex_const: Integer read Fhex_const;
          class property GEN_ME: Integer read FGEN_ME;
          class property GEn_DU: Double read FGEn_DU;
          // ...
      

      and the F-members initialized in the CTOR. At least for base types this could be improved to

        TConstants = class
        public
          const myInt = LongInt( 3);
          const hex_const = LongInt( 31);
          const GEN_ME = LongInt( -3523553);
          const GEn_DUB = 325.532;
      

      Attachments

        Issue Links

          Activity

            People

              jensg Jens Geyer
              jensg Jens Geyer
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: