On 9/4/2013 12:45 AM, Chris Pearce wrote:
On 04-Sep-13 4:18 PM, Robert O'Callahan wrote:
I like to put "virtual" on all methods that are virtual, even when it's not
strictly necessary because the method overrides a virtual method  of the
parent class.

Other people disagree, especially when the method has MOZ_OVERRIDE on it as
well.

"virtual" on non-overrides, MOZ_OVERRIDE on overrides.

I still agree with roc that "virtual MOZ_OVERRIDE" is better than just MOZ_OVERRIDE.

MOZ_OVERRIDE implies virtual, you get a compile error when you put MOZ_OVERRIDE on a non virtual
It does? That surprises me (it certainly wasn't the original intent of NS_OVERRIDE). There are certainly cases where we want to override non-virtual methods with an identical signature.

--BDS

_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to