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

for generated Obj-C constants, move static variable declarations in implementation file to 'static const' declarations in header file

    XMLWordPrintableJSON

    Details

    • Type: Improvement
    • Status: Closed
    • Priority: Minor
    • Resolution: Won't Do
    • Affects Version/s: 0.1, 0.9
    • Fix Version/s: 0.13.0
    • Component/s: Cocoa - Compiler
    • Labels:
      None
    • Patch Info:
      Patch Available

      Description

      By declaring constants as 'static const' in the header file instead in of the implementation file we can use the constants in more places, such as in case statements of switch blocks.

      Currently in Obj-C constants can only be accessed by using the static methods, which leads to some limitations.

      The 'const' prefix only should apply to "primitive" constants (not structs or collections)

        Attachments

          Activity

            People

            • Assignee:
              jking3 James E. King III
              Reporter:
              rockfakie Paul Mans
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: