Menu

#268 Superfluous members in TMemoryDC

6.40.2
closed
API (61)
1
2014-10-05
2014-09-04
No

TMemoryDC reimplements the methods SelectObject, RestoreBitmap and RestoreObjects that are found in the base class TDC. These methods are not virtual, so the TMemoryDC definitions just hide the definitions in TDC.

The reimplementation of RestoreObjects first calls TDC::RestoreObjects, then RestoreBitmap. But RestoreBitmap is called within TDC::RestoreObjects as well, leading to RestoreBitmap being called twice (this should cause no harm, though). The same happens in the TMemoryDC destructor.

The TMemoryDC implementations of the rest of these methods are identical to those in TDC, so they serve no purpose.

1 Attachments

Related

Wiki: OWLNext_Stable_Releases

Discussion

  • Vidar Hasfjord

    Vidar Hasfjord - 2014-09-05
    • labels: --> API
    • summary: TMemoryDC implementation --> Superfluous members in TMemoryDC
    • assigned_to: Vidar Hasfjord
    • Group: unspecified --> 6.40.2

    I've replaced the attached files by a patch, and added a summary to the ticket.

    PAILLER Fabien (iruka-kalite) wrote:

    Hi, i have notified the next problem in OWLNext 6.30.12.

    The implementation of TMemoryDC interfer with TDC. SelectObject() methods, RestoreBitmap() and RestoreObjects() are overided in TMemoryDC but are not virtual in TDC. These methods do nothing more TDC implementation.

    The member OrgBitmap of TMemoryDC already exist in TDC.

    So I propose the correction in the attached [patch]. I have tested it in our application and all is good.

     
  • Vidar Hasfjord

    Vidar Hasfjord - 2014-09-05
    • status: open --> pending

    This issue was fixed in [r2671] and merged into 6.40 in [r2673].

     

    Related

    Commit: [r2671]
    Commit: [r2673]

  • Vidar Hasfjord

    Vidar Hasfjord - 2014-10-05
    • Status: pending --> closed
     

Log in to post a comment.

MongoDB Logo MongoDB