Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 1554: CreateImplementation() does BAAD stuff
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

swinefeaster
Tomato Guru

310 Posts

Posted - May 14 2007 :  6:06:50 PM  Show Profile  Reply with Quote
:)

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

swinefeaster
Tomato Guru

310 Posts

Posted - May 14 2007 :  6:07:54 PM  Show Profile  Reply with Quote
oh wait --- maybe because i forgot the ";" after unlock ????
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19022 Posts

Posted - May 14 2007 :  6:46:33 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000