On 07/10/2009 01:57 AM, Amos Jeffries wrote: > Tsantilas Christos wrote: >> Alex Rousskov wrote: >>> On 07/09/2009 12:06 AM, Amos Jeffries wrote: >>>> ** Please make fqdncache_entry / ipcache_entry public classes instead >>>> of functional structs. Some gcc complain and doxygen won't document >>>> their functions properly. >>> >>> Sorry, I am not sure what you mean. What is a "functional struct"? Do >>> you want us to replace "struct fqdncache_entry" with "class >>> fqdncache_entry" and add "public:"? >>> >>> No objections, of course, just wanted to minimize merging headaches by >>> keeping out-of-scope changes to the minimum... >>> >> I did not touch it. The struct used in many places inside squid3 >> > > Please do change.
Let's compromise and change it in a separate patch because the change you are requesting is unrelated to the patch scope. > The rest of the code fails to prefix the names with "struct" the typedef > made that possible. > > Using class and public: is the C++ upgrade equivalent to the typedef and > allows functions/methods inside the struct where I suspect the typedef > did not. I am not sure that is a valid statement. IIRC, "struct" and "class" are "equal" citizens in C++ as far as C++ rules are concerned. One is not an upgrade of the other. Typedefs for structs are C legacy that are not needed (and harmful!) in C++ code. IIRC, I have removed them in this patch to make new method definitions look "normal". Cheers, Alex.
