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 » Small fix for Find in Algo.h
Re: BUG for Find in Algo.h [message #34813 is a reply to message #34776] Tue, 13 December 2011 17:16 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 13980
Registered: November 2005
Ultimate Member
U++ iterators are allowed to be assigned NULL, so it makes more sense to return NULL in 'fail' case by U++ algos.

It is written somewhere in doc, but perhaps should have been emphasized more...

So:

			if(it)
			{			
				//CAppli apptmp = *it;              //<---- IT'S BUG !!!!!!!!
				//apptmp.update();
				//Cout() << "\n  <- Why I fall here even if " << apptmp.m_appli << " is different of " << oAppli.m_appli;
				
				Cout() << "\n  <- Why I fall here?";
			}			


Notes:

U++ prefers index notation, so FindIndex(...) < 0 would be more 'U++ way'.

And based on the name of class, U++ now has pretty good JSON support:

http://www.ultimatepp.org/reference$JSON$en-us.html

Mirek
 
Read Message
Read Message
Read Message icon13.gif
Read Message
Read Message
Read Message
Previous Topic: A probably simple question about pick semantics
Next Topic: Preferred way to access VectorMap
Goto Forum:
  


Current Time: Tue May 14 18:17:05 CEST 2024

Total time taken to generate the page: 0.01789 seconds