Op 27-3-2025 om 12:28 schreef Martin Frb via fpc-devel:
which returns True, if Akey was found and therefore APtr points to
existing Data, while otherwise APtr points to the empty slot, where
the data can be copied to.
Without a key, you can't find the bucket or whatever where to allocate,
For your second feature request it just needs a method added to THashSet
that retrieves the stored item based on the passed key.
> On 27/03/2025 12:28 CET Martin Frb via fpc-devel
> wrote:
>
>
> There are 2 features, I am missing.
>
> And I can't see a way to add them via subclassing, as th
It does not violate the contract imho.
In a TDictionary it would return a pointer to V which is valid because it
either retrieved an existing entry or added a new one with default(v).
I implemented this a while ago in Spring4D roughly following the API that was
introduced in .NET some time ago.
On 27/03/2025 12:45, Martin Frb via fpc-devel wrote:
On 27/03/2025 12:33, Marco van de Voort via fpc-devel wrote:
Op 27-3-2025 om 12:28 schreef Martin Frb via fpc-devel:
which returns True, if Akey was found and therefore APtr points to
existing Data, while otherwise APtr points to the empty
On 27/03/2025 12:33, Marco van de Voort via fpc-devel wrote:
Op 27-3-2025 om 12:28 schreef Martin Frb via fpc-devel:
which returns True, if Akey was found and therefore APtr points to
existing Data, while otherwise APtr points to the empty slot, where
the data can be copied to.
Without a k
There are 2 features, I am missing.
And I can't see a way to add them via subclassing, as the internal
FItems array is private, and neither TItem, nor TPair can be gotten by
the integer index into that array.
1) AddOrGetPointerToEmpty
This would actually just be to try and see if it gives any