Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(611)

Side by Side Diff: site/dev/contrib/style.md

Issue 1037793002: C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla} (Closed) Base URL: https://skia.googlesource.com/skia@master
Patch Set: git cl web Created 5 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « site/dev/contrib/flatten.md ('k') | site/user/sample/hello.md » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 Coding Style Guidelines 1 Coding Style Guidelines
2 ======================= 2 =======================
3 3
4 These conventions have evolved over time. Some of the earlier code in both 4 These conventions have evolved over time. Some of the earlier code in both
5 projects doesn’t strictly adhere to the guidelines. However, as the code evolves 5 projects doesn’t strictly adhere to the guidelines. However, as the code evolves
6 we hope to make the existing code conform to the guildelines. 6 we hope to make the existing code conform to the guildelines.
7 7
8 Files 8 Files
9 ----- 9 -----
10 10
(...skipping 303 matching lines...) Expand 10 before | Expand all | Expand 10 after
314 314
315 <!--?prettify?--> 315 <!--?prettify?-->
316 ~~~~ 316 ~~~~
317 class GrDillPickle : public GrPickle { 317 class GrDillPickle : public GrPickle {
318 ... 318 ...
319 private: 319 private:
320 typedef GrPickle INHERITED; 320 typedef GrPickle INHERITED;
321 }; 321 };
322 ~~~~ 322 ~~~~
323 323
324 Virtual functions that are overridden in derived classes should use SK_OVERRIDE 324 Virtual functions that are overridden in derived classes should use override
325 (and not the override keyword). The virtual keyword can be omitted. 325 (and not the override keyword). The virtual keyword can be omitted.
326 326
327 <!--?prettify?--> 327 <!--?prettify?-->
328 ~~~~ 328 ~~~~
329 void myVirtual() SK_OVERRIDE { 329 void myVirtual() override {
330 } 330 }
331 ~~~~ 331 ~~~~
332 332
333 This should be the last element of their private section, and all references to 333 This should be the last element of their private section, and all references to
334 base-class implementations of a virtual function should be explicitly qualified: 334 base-class implementations of a virtual function should be explicitly qualified:
335 335
336 <!--?prettify?--> 336 <!--?prettify?-->
337 ~~~~ 337 ~~~~
338 void myVirtual() SK_OVERRIDE { 338 void myVirtual() override {
339 ... 339 ...
340 this->INHERITED::myVirtual(); 340 this->INHERITED::myVirtual();
341 ... 341 ...
342 } 342 }
343 ~~~~ 343 ~~~~
344 344
345 As in the above example, derived classes that redefine virtual functions should 345 As in the above example, derived classes that redefine virtual functions should
346 use SK_OVERRIDE to note that explicitly. 346 use override to note that explicitly.
347 347
348 Constructor initializers should be one per line, indented, with punctuation 348 Constructor initializers should be one per line, indented, with punctuation
349 placed before the initializer. This is a fairly new rule so much of the existing 349 placed before the initializer. This is a fairly new rule so much of the existing
350 code is non-conforming. Please fix as you go! 350 code is non-conforming. Please fix as you go!
351 351
352 <!--?prettify?--> 352 <!--?prettify?-->
353 ~~~~ 353 ~~~~
354 GrDillPickle::GrDillPickle() 354 GrDillPickle::GrDillPickle()
355 : GrPickle() 355 : GrPickle()
356 , fSize(kDefaultPickleSize) { 356 , fSize(kDefaultPickleSize) {
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 this->drawBitmapRectToRect( 551 this->drawBitmapRectToRect(
552 bitmap, NULL, dst, paint, kNone_DrawBitmapRectFlag); 552 bitmap, NULL, dst, paint, kNone_DrawBitmapRectFlag);
553 } 553 }
554 ~~~~ 554 ~~~~
555 555
556 Python 556 Python
557 ------ 557 ------
558 558
559 Python code follows the [Google Python Style Guide](http://google-styleguide.goo glecode.com/svn/trunk/pyguide.html). 559 Python code follows the [Google Python Style Guide](http://google-styleguide.goo glecode.com/svn/trunk/pyguide.html).
560 560
OLDNEW
« no previous file with comments | « site/dev/contrib/flatten.md ('k') | site/user/sample/hello.md » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698