Skip to content

Commit 7923a22

Browse files
Update docs to be consistent with prevalent style (#2491)
1 parent b8b6f6d commit 7923a22

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

docs/Handles.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -83,21 +83,22 @@ Add a `friend` declaration for the base class.
8383
// Example of a custom shared device, that accepts an instance as a parent
8484
class MySharedHandle<VkDevice> : public vk::SharedHandleBase<VkDevice, vk::SharedInstance, MySharedHandle<VkDevice>>
8585
{
86-
using base = vk::SharedHandleBase<VkDevice, vk::SharedInstance, MySharedHandle<VkDevice>>;
87-
friend base;
86+
using Base = vk::SharedHandleBase<VkDevice, vk::SharedInstance, MySharedHandle<VkDevice>>;
87+
friend Base;
8888
8989
public:
9090
MySharedHandle() = default;
91-
explicit MySharedHandle(VkDevice handle, vk::SharedInstance parent) noexcept
92-
: base(handle, std::move(parent)) {}
91+
explicit MySharedHandle(VkDevice handle, vk::SharedInstance parent) noexcept:
92+
Base(handle, std::move(parent)) {}
9393
94-
const auto& getParent() const noexcept
94+
[[nodiscard]]
95+
const vk::SharedInstance& getParent() const noexcept
9596
{
9697
return getHeader();
9798
}
9899
99100
protected:
100-
static void internalDestroy(const vk::SharedInstance& /*control*/, VkDevice handle) noexcept
101+
static void internalDestroy([[maybe_unused]] const vk::SharedInstance& control, VkDevice handle) noexcept
101102
{
102103
vkDestroyDevice(handle);
103104
}

docs/Usage.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -905,14 +905,15 @@ This may be combined with the following basic `main.cpp` consumer code:
905905
// optional include for VULKAN_HPP_DEFAULT_DISPATCHER
906906
// otherwise, use vk::detail::defaultDispatchLoaderDynamic
907907
#include <vulkan/vulkan_hpp_macros.hpp>
908+
908909
import vulkan;
909910

910-
auto main(int argc, char* const argv[]) -> int
911+
int main(int argc, char* argv[])
911912
{
912913
// initialize minimal set of function pointers
913914
VULKAN_HPP_DEFAULT_DISPATCHER.init();
914915

915-
auto appInfo = vk::ApplicationInfo("My App", 1, "My Engine", 1, vk::makeApiVersion(1, 0, 0, 0));
916+
vk::ApplicationInfo appInfo("My App", 1, "My Engine", 1, vk::makeApiVersion(1, 0, 0, 0));
916917

917918
vk::Instance instance;
918919
// create vk::Instance instance here

0 commit comments

Comments
 (0)