trivial typo and ide warnings fixes

This commit is contained in:
Mathias Agopian
2022-09-30 11:32:38 -07:00
committed by Mathias Agopian
parent 359624e8eb
commit b4142261c2
2 changed files with 17 additions and 17 deletions

View File

@@ -384,53 +384,53 @@ bool reshape(const PixelBufferDescriptor& data, PixelBufferDescriptor& reshaped)
namespace utils {
template<>
CString to_string<filament::backend::TextureUsage>(filament::backend::TextureUsage usage) noexcept {
CString to_string<filament::backend::TextureUsage>(filament::backend::TextureUsage value) noexcept {
using namespace filament::backend;
char string[7] = {'-', '-', '-', '-', '-', '-', 0};
if (any(usage & TextureUsage::UPLOADABLE)) {
if (any(value & TextureUsage::UPLOADABLE)) {
string[0]='U';
}
if (any(usage & TextureUsage::SAMPLEABLE)) {
if (any(value & TextureUsage::SAMPLEABLE)) {
string[1]='S';
}
if (any(usage & TextureUsage::COLOR_ATTACHMENT)) {
if (any(value & TextureUsage::COLOR_ATTACHMENT)) {
string[2]='c';
}
if (any(usage & TextureUsage::DEPTH_ATTACHMENT)) {
if (any(value & TextureUsage::DEPTH_ATTACHMENT)) {
string[3]='d';
}
if (any(usage & TextureUsage::STENCIL_ATTACHMENT)) {
if (any(value & TextureUsage::STENCIL_ATTACHMENT)) {
string[4] = 's';
}
if (any(usage & TextureUsage::SUBPASS_INPUT)) {
if (any(value & TextureUsage::SUBPASS_INPUT)) {
string[5]='f';
}
return CString(string, 6);
return { string, 6 };
}
template<>
CString to_string<filament::backend::TargetBufferFlags>(filament::backend::TargetBufferFlags flags) noexcept {
CString to_string<filament::backend::TargetBufferFlags>(filament::backend::TargetBufferFlags value) noexcept {
using namespace filament::backend;
char string[7] = {'-', '-', '-', '-', '-', '-', 0};
if (any(flags & TargetBufferFlags::COLOR0)) {
if (any(value & TargetBufferFlags::COLOR0)) {
string[0]='0';
}
if (any(flags & TargetBufferFlags::COLOR1)) {
if (any(value & TargetBufferFlags::COLOR1)) {
string[1]='1';
}
if (any(flags & TargetBufferFlags::COLOR2)) {
if (any(value & TargetBufferFlags::COLOR2)) {
string[2]='2';
}
if (any(flags & TargetBufferFlags::COLOR3)) {
if (any(value & TargetBufferFlags::COLOR3)) {
string[3]='3';
}
if (any(flags & TargetBufferFlags::DEPTH)) {
if (any(value & TargetBufferFlags::DEPTH)) {
string[4]='D';
}
if (any(flags & TargetBufferFlags::STENCIL)) {
if (any(value & TargetBufferFlags::STENCIL)) {
string[5]='S';
}
return CString(string, 6);
return { string, 6 };
}
} // namespace utils

View File

@@ -1046,7 +1046,7 @@ FrameGraphId<FrameGraphTexture> PostProcessManager::gaussianBlurPass(FrameGraph&
[=](FrameGraphResources const& resources,
auto const& data, DriverApi& driver) {
// don't use auto for those, b/c the can't resolve them
// don't use auto for those, b/c the ide can't resolve them
using FGTD = FrameGraphTexture::Descriptor;
using FGTSD = FrameGraphTexture::SubResourceDescriptor;