Cleanup: various non functional C++ changes

This commit is contained in:
Campbell Barton
2024-04-20 13:09:21 +10:00
parent c6a9b11ef6
commit fd589fdca4
28 changed files with 53 additions and 59 deletions

View File

@@ -748,7 +748,7 @@ template<typename StorageType> void convert(SignedNormalized<StorageType> &dst,
static constexpr int32_t scalar = SignedNormalized<StorageType>::scalar();
static constexpr int32_t delta = SignedNormalized<StorageType>::delta();
static constexpr int32_t max = SignedNormalized<StorageType>::max();
dst.value = (clamp_i((src.value * scalar + delta), 0, max));
dst.value = clamp_i((src.value * scalar + delta), 0, max);
}
template<typename StorageType> void convert(F32 &dst, const SignedNormalized<StorageType> &src)
@@ -762,7 +762,7 @@ template<typename StorageType> void convert(UnsignedNormalized<StorageType> &dst
{
static constexpr uint32_t scalar = UnsignedNormalized<StorageType>::scalar();
static constexpr uint32_t max = scalar;
dst.value = (clamp_f((src.value * float(scalar)), 0, float(max)));
dst.value = clamp_f((src.value * float(scalar)), 0, float(max));
}
template<typename StorageType> void convert(F32 &dst, const UnsignedNormalized<StorageType> &src)

View File

@@ -28,7 +28,7 @@ VkDescriptorSetLayout VKDescriptorSetLayouts::get_or_create(const VKDescriptorSe
bool &r_needed)
{
r_created = false;
r_needed = !(info.bindings.is_empty());
r_needed = !info.bindings.is_empty();
if (r_needed == false) {
return VK_NULL_HANDLE;
}

View File

@@ -300,7 +300,7 @@ std::string VKDevice::driver_version() const
/* When using Mesa driver we should use VK_VERSION_*. */
if (major > 30) {
return std::to_string((driver_version >> 14) & 0x3FFFF) + "." +
std::to_string((driver_version & 0x3FFF));
std::to_string(driver_version & 0x3FFF);
}
break;
}