Overview
Examples
Screenshots
Comparisons
Applications
Download
Documentation
Tutorials
Bazaar
Status & Roadmap
FAQ
Authors & License
Forums
Funding Ultimate++
Search on this site
Search in forums












SourceForge.net Logo
Home » U++ Library support » U++ Library : Other (not classified elsewhere) » CtrlCore.h const correctnes fixes
CtrlCore.h const correctnes fixes [message #30158] Sun, 12 December 2010 14:03 Go to next message
kohait00 is currently offline  kohait00
Messages: 934
Registered: July 2009
Location: Germany
Experienced Contributor
hi there

i stumbled over some const correctnes issues in CtrlCore.h

CtrlCore.h:1177
	bool    HasMouseInFrame(const Rect& r) const;


this one is more problematic, since it is a virtual public
CtrlCore.h:1015
	virtual Rect   GetOpaqueRect() const;
	virtual Rect   GetVoidRect() const;

it implies changes to LabelBox and ParentCtrl, and TabCtrl

i haven't scanned bazaar for usage of theese 2
Re: CtrlCore.h const correctnes fixes [message #30159 is a reply to message #30158] Sun, 12 December 2010 15:50 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
HasMouseInFrame fixed, thanks

I am afraid we should not fix those virtuals. Or perhaps by adding const versions, being called by deprecated non-const ones?

Mirek
Re: CtrlCore.h const correctnes fixes [message #30163 is a reply to message #30159] Sun, 12 December 2010 17:06 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 934
Registered: July 2009
Location: Germany
Experienced Contributor
i dont think it will work to provide depricated non const ones to call const ones, cause it is the non const ones, who are overriden in user code..and need to be called

i also see the point of keeping the code compatibility..
but code should get more and more mature..it's up to you, i just pointed to..i dont mind Smile

EDIT
in bazaar there isn't any dependendent changes so far..
for the others, one might mention it in changelog, so the next releases are fixed accordingly

[Updated on: Sun, 12 December 2010 17:31]

Report message to a moderator

Re: CtrlCore.h const correctnes fixes [message #30164 is a reply to message #30163] Sun, 12 December 2010 17:48 Go to previous messageGo to next message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 12 December 2010 11:06

i dont think it will work to provide depricated non const ones to call const ones, cause it is the non const ones, who are overriden in user code..and need to be called



Correct. We at least would need to change the name too... Sad

Quote:


i also see the point of keeping the code compatibility..
but code should get more and more mature..it's up to you, i just pointed to..i dont mind Smile



Yep. I might reconsider. Still, it is not uppsrc/bazaar code I am afraid about...

Truth is that these are methods that only cover some very special issues of static widgets...

Mirek
Re: CtrlCore.h const correctnes fixes [message #30165 is a reply to message #30164] Sun, 12 December 2010 18:20 Go to previous messageGo to next message
kohait00 is currently offline  kohait00
Messages: 934
Registered: July 2009
Location: Germany
Experienced Contributor
i think so too, they might only be used in some marginal cases..not a wide field affecting change
Re: CtrlCore.h const correctnes fixes [message #30201 is a reply to message #30165] Wed, 15 December 2010 15:02 Go to previous message
mirek is currently offline  mirek
Messages: 12105
Registered: November 2005
Ultimate Member
kohait00 wrote on Sun, 12 December 2010 12:20

i think so too, they might only be used in some marginal cases..not a wide field affecting change


OK, it is now cont. Came to conclusion that these are in fact corner case paint process omptimizers, even if they are not defined, it is not going to affect too much.

Mirek
Previous Topic: why not StaticText::SetData != StaticText::SetText
Next Topic: pregexp isn't compiling complaining about undefined symbols
Goto Forum:
  


Current Time: Thu Nov 21 17:07:30 CET 2019

Total time taken to generate the page: 0.02458 seconds