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

Incorrect test in fontmanager code and other coding issues

XMLWordPrintable

    • 2d
    • 1.4.1
    • generic
    • generic
    • Not verified



      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.

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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: