29
edits
No edit summary |
m (→Inline methods: Class definition bracing consistency.) |
||
Line 91: | Line 91: | ||
}; | }; | ||
If it's too long, put the type, declarator including formals (unless they overflow), and left brace all on the first line: | If it's too long, put the type, declarator including formals (unless they overflow), and left brace all on the first line: | ||
class Eater { | class Eater | ||
{ | |||
Food *obtainFoodFromEatery(Eatery &eatery) { | Food *obtainFoodFromEatery(Eatery &eatery) { | ||
if (!eatery.hasFood()) | if (!eatery.hasFood()) | ||
Line 99: | Line 100: | ||
}; | }; | ||
For out-of-line inlines (when the definitions are too unwieldy to place in the class definition) use the inline keyword as an indicator that there's an out-of-line inline definition: | For out-of-line inlines (when the definitions are too unwieldy to place in the class definition) use the inline keyword as an indicator that there's an out-of-line inline definition: | ||
class SpaceGoo { | class SpaceGoo | ||
{ | |||
inline BlobbyWrapper *enblob(Entity &other); | inline BlobbyWrapper *enblob(Entity &other); | ||
}; | }; |
edits