xoofx/CppAst.NET

GetCursorSpelling should return back CString not ToString()

wackoisgod opened this issue · 2 comments

The reason I don't like that the function uses ToString() is that it does not retain the casing on the cursor name. So if you have specific naming conventions on your code and you want to retain that convention post parse all the names of the decl will be lowercase because that is what ToString is doing.

If we don't want to change GetCursorSpelling to use the CString then we should at least have another field that retains the original name of the decl.

xoofx commented

I'm confused, GetCursorSpelling is just a shortcut to cursor.Spelling.ToString();, which gets the CString... or am I missing something?

You are right... I must have been seeing things :(