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++ Core » Rect_<T>::SetNull not correct for Rectf (Rect_<double>)
Rect_<T>::SetNull not correct for Rectf (Rect_<double>) [message #31959] Mon, 11 April 2011 22:25 Go to previous message
hans is currently offline  hans
Messages: 44
Registered: March 2006
Location: Germany
Member
Hi,
latest addition of SetNull is implemented as
void   SetNull()                        { left = top = right = bottom = Null; }


but template specialisation for Rect_<double>(Null) is implemented as
template <>
inline Rect_<double>::Rect_(const Nuller&) {
	left = top = 0;
	right = bottom = -1;
}


I would suggest to implement SetNull as
void   SetNull()                        { *this= Rect_(Null); }

which works for Rect_<T> for generic T and specialisation.

Thanks,
Hans

[Updated on: Mon, 11 April 2011 22:27]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: ADDs: ValueMap
Next Topic: FIX: UPP::Scan returns int64 for INT_V
Goto Forum:
  


Current Time: Thu May 09 07:54:02 CEST 2024

Total time taken to generate the page: 0.01835 seconds