Update docs to be consistent with prevalent style#2491
Update docs to be consistent with prevalent style#2491asuessenbach merged 1 commit intoKhronosGroup:mainfrom
Conversation
|
Thanks for trying again. I meant to fold your corrections from earlier into the big commit, but clearly I missed many. Any additional wording suggestions (in fact, I think it's a good idea to use One note, though...
I think there is a safety argument here; in fact, I would |
|
This is a simple example, so I don't really think the need to Also, while I didn't return to re-adding |
There is now a PR for this, #2492. |
|
Thanks for your contribution! |
This PR addresses some of the inconsistencies seen in the docs:
MySharedHandleclass names its base class asbase, though the rest of the library uses PascalCase, so this should be updated toBase.MySharedHandle::getParentshould be clearer on what it returns, so I updated the return type fromconst auto&toconst vk::SharedInstance&. I also marked it[[nodiscard]]because it is a getter function and its value shouldn't be discarded if called.MySharedHandle::internalDestroy, use the[[maybe_unused]]attribute to make it clear the parameter is not considered.autodeclarations (auto appInfo = ApplicationInfo(/* ... */);), but the rest of the library doesn't. This could instead more simply (and more briefly) be written with direct-initialisation (ApplicationInfo appInfo(/* ... */);).main()signature is most often depicted asint main(), rather than with trailing return type (auto main() -> int), and there's no reason to make this arbitrary difference. Also,argvis most often depicted aschar* argv[], notchar* const argv[], so we might as well just stick withchar* argv[](without theconstspecifier).