Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 1554: CreateImplementation() does BAAD stuff

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
swinefeaster Posted - May 14 2007 : 6:06:50 PM
:)

Here's my header:



#pragma once

#include "HashableRect.h"

class ImageGroup;

// This class implements a cached bitmap of a given OZO_XXX zorder layer.

class OverlayCachedLayer
{
  public:
    OverlayCachedLayer(void);
    virtual ~OverlayCachedLayer(void);

    // Draws this cached layer onto the given dc.
    void draw(HDC dcHandle);

    // Locks for drawing.
    HDC lock(void);

    // Unlocks from drawing.
    void unlock(void)

    // Updates the dimension of the overlay canvas.
    void setDimensions(const CSize& dimensions);

  private:
    // The bitmap used to provide flicker-free update of the canvas.
    ImageGroup* m_offscreen;

    // Map of rects that need to be redrawn.
    // This is a hash table to make sure all rects are unique --- this has
    // the nice side-effect that if an overlay makes its rect dirty a
    // successive number of times and does not move, only one dirty
    // rect will be stored.
    // The bool values mean nothing.
    CMap<HashableRect, const HashableRect&, bool, bool> m_dirtyRectMap;
};



If I click on unlock() and do Create Implementation, I get:


void
OverlayCachedLayer::unlock(const CSize& dimensions)
{
  
}


Note that the parameters are wrong --- taken from the wrong function.

Thanks,

swine
2   L A T E S T    R E P L I E S    (Newest First)
feline Posted - May 14 2007 : 6:46:33 PM
It is in fact the missing semi-colon confusing matters. I have sworn a few times at refactoring myself when it has refused to do what I want, only to find a missing semi-colon, and thus code that VA does not understand enough to safely refactor.

See, its actually a feature, alerting you to the problem with the code
swinefeaster Posted - May 14 2007 : 6:07:54 PM
oh wait --- maybe because i forgot the ";" after unlock ????

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000