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 » FIX: UPP::Scan returns int64 for INT_V
Re: FIX: UPP::Scan returns int64 for INT_V [message #32467 is a reply to message #32460] Thu, 19 May 2011 09:35 Go to previous message
kohait00 is currently offline  kohait00
Messages: 939
Registered: July 2009
Location: Germany
Experienced Contributor
you're right as usual Smile
the int64 return needs to be addressed as well.

in this case i'd vote for separating the ConvertInt::Scan and ConvertInt64::Scan, so they both deal respectively with their proper minval maxval, so we have the INT_MAX/INT_MIN issue only in constructors. i think that's be more clean...

so i'd be
Value ConvertInt::Scan() { /***/ return int(v); }
Value ConvertInt64::Scan() { /***/ return v; }


i also thought of swapping derive order, to have ConvertInt->ConvertInt64. this would make possible to have a short ConvertInt::Scan like
Value ConvertInt::Scan()
{
Value v = ConvertInt64::Scan();
if(!IsErrorValue(v)) return int(m);
return v;
}


maybe that's an even cleaner option..

BTW: ConvertInt64 daysichain stuff returns ConvertInt& instead ConvertInt64&

[Updated on: Thu, 19 May 2011 09:36]

Report message to a moderator

 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Rect_<T>::SetNull not correct for Rectf (Rect_<double>)
Next Topic: Ptr improve
Goto Forum:
  


Current Time: Tue Apr 29 23:22:00 CEST 2025

Total time taken to generate the page: 0.00618 seconds