Changeset 242273 in webkit
- Timestamp:
- Mar 1, 2019 11:21:15 AM (5 years ago)
- Location:
- trunk/Websites/webkit.org
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Websites/webkit.org/ChangeLog
r241839 r242273 1 2019-02-21 Ryosuke Niwa <rniwa@webkit.org> 2 3 Codify the naming convention for fooIfExists 4 https://bugs.webkit.org/show_bug.cgi?id=194930 5 6 Reviewed by Darin Adler. 7 8 Updating the coding style guideline after the discussion following 9 https://lists.webkit.org/pipermail/webkit-dev/2013-June/025056.html 10 11 * code-style.md: 12 1 13 2019-02-20 Jon Davis <jond@apple.com> 2 14 -
trunk/Websites/webkit.org/code-style.md
r235717 r242273 675 675 ```cpp 676 676 bool toASCII(short*, size_t); 677 ``` 678 679 [](#names-if-exists) The getter function for a member variable should not have any suffix or prefix indicating the function can optionally create or initialize the member variable. Suffix the getter function which does not automatically create the object with `IfExists` if there is a variant which does. 680 681 ###### Right: 682 683 ```cpp 684 StyleResolver* styleResolverIfExists(); 685 StyleResolver& styleResolver(); 686 ``` 687 688 ###### Wrong: 689 690 ```cpp 691 StyleResolver* styleResolver(); 692 StyleResolver& ensureStyleResolver(); 693 ``` 694 695 ###### Right: 696 697 ```cpp 698 Frame* frame(); 699 ``` 700 701 ###### Wrong: 702 703 ```cpp 704 Frame* frameIfExists(); 677 705 ``` 678 706
Note: See TracChangeset
for help on using the changeset viewer.