Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4863752

Incorrect test in fontmanager code and other coding issues

    Details

    • Subcomponent:
      2d
    • Resolved In Build:
      1.4.1
    • CPU:
      generic
    • OS:
      generic
    • Verification:
      Not verified

      Description



      Name: dk106046 Date: 05/14/2003

      DESCRIPTION:
      ------------
      Coding errors detected by compiler:
      1) In fontObject.cpp:
      The test
             if (fFamilyNameAlt = NULL) {

      should be
             if (fFamilyNameAlt != NULL) {

      2) In fontpath.c:
      The declaration
             static fontLcid = 0;
      should be
             static int fontLcid = 0;

      3) In fontObject.h
            virtual const UInt16 GetUnitsPerEM() { return fUnitsPerEM;}
            virtual const UInt16 GetMacStyle() { return fMacStyle;}
            virtual const UInt16 GetUnitsPerEM();

      should be const funcs not functions returning const, viz

             virtual UInt16 GetUnitsPerEM() const { return fUnitsPerEM;}
      etc

      4) In fontObject.cpp, boldNames and italicNames are both declared locally and
      declared extern.

      ======================================================================

        Attachments

          Activity

            People

            • Assignee:
              prr Philip Race
              Reporter:
              dkorbel David Korbel (Inactive)
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Imported:
                Indexed: