| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 |
| OLD | NEW |