Alex Vincent wrote:
Should I use nsClassHashtable or nsDataHashtable?
nsClassHashtable "owns" the pointers, and "delete"s them when an entry is removed.
nsDataHashtable just holds a type in the entry. Which one you use depends on your needs in terms of cleaning up entries.
(2) Is there a better way to do this:+ + if (total > 1) + { + currentStep.Append('['); + currentStep.AppendInt(index); + currentStep.Append(']'); + }
No, that's good.
(3) peterv made a reference to:aResult.AppendLiteral("\", '\"', \"");This isn't documented in the XPCOM:Strings guide. Any pointers where I can find documentation on it, and learn how to use it properly?
Read the headers, of course! http://lxr.mozilla.org/mozilla/source/xpcom/string/public/nsTAString.h#460
It is used for real literals which can be treated as a const char[] and not just a const char*... this allows smart compilers to not have to do a strlen() on the buffer (because it's known at compile-time).
--BDS _______________________________________________ dev-tech-xpcom mailing list [email protected] https://lists.mozilla.org/listinfo/dev-tech-xpcom
