macmade / CFPP

C++ wrapper for CoreFoundation base classes.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Dictionary constructor doesn't take ints.

mitchellwong opened this issue · comments

According to the readme CF::Dictionary d3( 100 ); is valid for constructing a dictionary with an initial capacity. If I do this I get error Types CF::Dictionary and int are not compatible. As well, I don't see a constructor for int in the Dictionary header.

Thanks a lot, this has been fixed in 2c75884 for CF::Array and CF::Dictionary.

Note that this has also been added to CF::Data in 6c2aaa7.

"All CF::Array objects are created as mutable, and an initial capacity can be passed to the constructor:"

"Initial capacity" seems a bit misleading because the capacity of a CFType can't change once set. CoreFoundation documentation tends towards the phrase "maximum capacity", but "fixed capacity" may be more suitable.

That's right, I'll fix the documentation in the development branch for the next release. Thanks.