const correctness

This commit is contained in:
PancakeTAS 2025-06-29 17:21:04 +02:00
parent 20fcab9a88
commit 93ecfbd79e
No known key found for this signature in database
4 changed files with 4 additions and 4 deletions

View file

@ -43,7 +43,7 @@ namespace Vulkan::Core {
/// @throws std::logic_error if the fence is not valid.
/// @throws ls::vulkan_error if waiting fails.
///
bool wait(uint64_t timeout = UINT64_MAX);
[[nodiscard]] bool wait(uint64_t timeout = UINT64_MAX) const;
/// Get the Vulkan handle.
[[nodiscard]] auto handle() const { return *this->fence; }

View file

@ -48,7 +48,7 @@ namespace Vulkan::Core {
/// @throws std::logic_error if the semaphore is not a timeline semaphore.
/// @throws ls::vulkan_error if waiting fails.
///
bool wait(uint64_t value, uint64_t timeout = UINT64_MAX);
[[nodiscard]] bool wait(uint64_t value, uint64_t timeout = UINT64_MAX) const;
/// Get the Vulkan handle.
[[nodiscard]] auto handle() const { return *this->semaphore; }

View file

@ -36,7 +36,7 @@ void Fence::reset() const {
throw ls::vulkan_error(res, "Unable to reset fence");
}
bool Fence::wait(uint64_t timeout) {
bool Fence::wait(uint64_t timeout) const {
if (!this->isValid())
throw std::logic_error("Invalid fence");

View file

@ -47,7 +47,7 @@ void Semaphore::signal(uint64_t value) const {
throw ls::vulkan_error(res, "Unable to signal semaphore");
}
bool Semaphore::wait(uint64_t value, uint64_t timeout) {
bool Semaphore::wait(uint64_t value, uint64_t timeout) const {
if (!this->isValid() || !this->isTimeline)
throw std::logic_error("Invalid timeline semaphore");