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 » FEATURE: T* ArrayIndex::Detach(int i) AND mini fix
Re: FEATURE: T* ArrayIndex::Detach(int i) AND mini fix [message #26337 is a reply to message #26295] Mon, 26 April 2010 10:18 Go to previous messageGo to previous message
mirek is currently offline  mirek
Messages: 14261
Registered: November 2005
Ultimate Member
kohait00 wrote on Thu, 22 April 2010 05:06

the Detach function available in Array:: and ArrayMap (recently added) should be added to ArrayIndex as well, right?

Index.h:229 should be added sth like

	T        *PopDetach()                           { B::hash.Drop(1); return B::key.PopDetach(); }
	T        *Detach(int i)                         { B::hash.Remove(i); return B::key.Detach(i); }




Well, why not, applied.

Frankly, IndexArray is provided just for completeness. I do not remember using it ever... Smile It so happens that all potential keys tend to be moveable... (in fact, 98% of keys is either int or String anyway).

Quote:


and a mini fix: (maybe forgotten? standard param)

Index.h:52 should be
	void  Drop(int n = 1);



Well, HashBase is just implementation issue that is not supposed to be used on its own... So its interface is irrelevant from client's perspective.

Mirek
 
Read Message
Read Message
Read Message
Previous Topic: WHY? "Index:: and ArrayIndex::operator[]" returns const T&
Next Topic: _pick understanding
Goto Forum:
  


Current Time: Mon Jun 16 01:50:51 CEST 2025

Total time taken to generate the page: 0.07697 seconds