Chromium Code Reviews| Index: src/globals.h |
| diff --git a/src/globals.h b/src/globals.h |
| index 26fd53114c62d582501e5d37c2c7791cb60cd99b..7848c50ce503492948b8e573726f441b4a435132 100644 |
| --- a/src/globals.h |
| +++ b/src/globals.h |
| @@ -375,6 +375,29 @@ F FUNCTION_CAST(Address addr) { |
| #endif |
| +// Annotate a virtual method indicating it must be overriding a virtual |
| +// method in the parent class. |
| +// Use like: |
| +// virtual void bar() OVERRIDE; |
| +#if __cplusplus >= 201103L |
|
Sven Panne
2013/08/19 12:44:48
Looking at Chrome's base/compiler_specific.h, I th
|
| +#define OVERRIDE override |
| +#else |
| +#define OVERRIDE |
| +#endif |
| + |
| + |
| +// Annotate a virtual method indicating that subclasses must not override it, |
| +// or annotate a class to indicate that it cannot be subclassed. |
| +// Use like: |
| +// class B FINAL : public A {}; |
| +// virtual void bar() FINAL; |
| +#if __cplusplus >= 201103L |
|
Sven Panne
2013/08/19 12:44:48
Same here: For MSVC we can fall back to 'sealed',
|
| +#define FINAL final |
| +#else |
| +#define FINAL |
| +#endif |
| + |
| + |
| #if defined(__GNUC__) && __GNUC__ >= 4 |
| #define MUST_USE_RESULT __attribute__ ((warn_unused_result)) |
| #else |