Hi,
Although it seems this forum is not very active, I'm not running out of suggestions about CEGUI development
It would be better if parameter names were not declared if they're not used.
Like:
Logger(const Logger& logger) : Singleton <Logger>() {}
Logger& operator=(const Logger& logger) {return *this;}
I would like to have this like:
Logger(const Logger&) : Singleton <Logger>() {}
Logger& operator=(const Logger&) {return *this;}
Cheers
Unused parameters in copy constructor and assignment
Moderators: CEGUI MVP, CEGUI Team
And, when sometime down the line, they do decide to use them? In your example, there is no advantage or disadvantage to either one. It's just a personal preference on what you like to see.
However, there is a clear-cut advantage if, down the line, that parameter is used. It's obviously a pretty minor one, but time is money. Even more importantly if you have to abide by some weird naming conventions that would make more sense to get out of the way when the programmer is actually in that mindset, instead of trying to back fill later.
Kinda like how commenting is best done as you work.
However, there is a clear-cut advantage if, down the line, that parameter is used. It's obviously a pretty minor one, but time is money. Even more importantly if you have to abide by some weird naming conventions that would make more sense to get out of the way when the programmer is actually in that mindset, instead of trying to back fill later.
Kinda like how commenting is best done as you work.
LennyH wrote:And, when sometime down the line, they do decide to use them? In your example, there is no advantage or disadvantage to either one. It's just a personal preference on what you like to see.
However, there is a clear-cut advantage if, down the line, that parameter is used. It's obviously a pretty minor one, but time is money. Even more importantly if you have to abide by some weird naming conventions that would make more sense to get out of the way when the programmer is actually in that mindset, instead of trying to back fill later.
Kinda like how commenting is best done as you work.
It's all about reducing warnings. Either that or using a #pragma to disable warnings then.
It's pretty far-fetching to say that declaring a variable name for an empty copy constructor would result a clear-cut advantage down the line After all it's a good C++ habit not to declare variable name if you are not going to use it.
Return to “Bug Reports, Suggestions, Feature Requests”
Who is online
Users browsing this forum: No registered users and 4 guests