Skip to content

Commit

Permalink
Remove cast to bool
Browse files Browse the repository at this point in the history
As Greg suggested, the cast to bool is no longer needed if we can cast
to an int, so we removed it. This commit also adds the uint64_t cast to
the pseudo class definition for BufferPointers.
  • Loading branch information
s-perron committed Dec 6, 2023
1 parent 1089a2b commit 9506e9f
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions proposals/0010-vk-buffer-ref.md
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ class vk::BufferPointer {
vk::BufferPointer& operator=(const vk::BufferPointer&);
vk::BufferPointer(const uint64_t);
S& Get() const;
operator uint64_t() const;
}
```

Expand All @@ -105,10 +106,8 @@ This new type will have the following operations
vk::BufferPointer<DstType, DstAlign> only if SrcType is a type derived from
DstType. vk::reinterpret_pointer_cast<T, A> allows casting for all other
BufferPointer types. For both casts, DstAlign <= SrcAlign must be true.
* A buffer pointer can be constructed from a uint64_t u using the constructor
* A buffer pointer can be constructed from a uint64_t using the constructor
syntax vk::BufferPointer<T,A>(u).
* A buffer pointer can be cast to a bool. If so, it returns FALSE if the
pointer is null, TRUE otherwise.
* A buffer pointer can be cast to a uint64_t. The cast will return the 64-bit
address that the pointer points to.

Expand Down

0 comments on commit 9506e9f

Please sign in to comment.