View Issue Details

IDProjectCategoryView StatusLast Update
0004882NoesisGUIC++ SDKpublic2026-03-16 10:57
ReporterFrancoisRecisio Assigned Tosfernandez  
PrioritynormalSeverityminor 
Status assignedResolutionopen 
Product Version3.2.12 
Summary0004882: BaseCollection::Count could be unsigned
Description

Hello! Is there a reason why the Count method is signed (when the value is not)?

class NS_GUI_CORE_API BaseCollection: public BaseComponent, public IList
{
[...]
    int Count() const final;
int BaseCollection::Count() const
{
    return mItems.Size();
}
uint32_t mSize;
PlatformAny

Activities

jsantos

jsantos

2026-03-10 18:00

manager   ~0012018

Last edited: 2026-03-10 18:00

I think this is because IList in C# has Count as a signed integer.

So probably the right thing here would be changing mSize to int32_t.

Are you having warnings about this?

FrancoisRecisio

FrancoisRecisio

2026-03-11 11:02

reporter   ~0012020

Last edited: 2026-03-11 11:02

Yes (but the warnings are on my side), I was cleaning up the signed and unsigned integer comparisons (in the for loops for example). It's not a big problem, but I was wondering why Count was signed, especially since all the other BaseCollection methods use unsigned indexes.

jsantos

jsantos

2026-03-16 10:56

manager   ~0012045

Last edited: 2026-03-16 10:57

Having a look at IList in C#, it is interesting that we decided to put int only in Count but not in the other functions also available from C# like RemoveAt(Int32). Not sure why, this is probably a mistake.

Issue History

Date Modified Username Field Change
2026-03-10 17:39 FrancoisRecisio New Issue
2026-03-10 17:59 jsantos Assigned To => sfernandez
2026-03-10 17:59 jsantos Status new => assigned
2026-03-10 18:00 jsantos Note Added: 0012018
2026-03-10 18:00 jsantos Status assigned => feedback
2026-03-10 18:00 jsantos Note Edited: 0012018
2026-03-10 18:00 jsantos Note Edited: 0012018
2026-03-11 11:02 FrancoisRecisio Note Added: 0012020
2026-03-11 11:02 FrancoisRecisio Status feedback => assigned
2026-03-11 11:02 FrancoisRecisio Note Edited: 0012020
2026-03-11 11:16 jsantos Description Updated
2026-03-16 10:56 jsantos Note Added: 0012045
2026-03-16 10:57 jsantos Note Edited: 0012045