Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upstream: Build: Ambiguous call to isfinite for MSVC 17.11 #92

Open
wants to merge 1 commit into
base: goo-engine-main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 1 addition & 15 deletions intern/cycles/scene/image.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,6 @@ CCL_NAMESPACE_BEGIN

namespace {

/* Some helpers to silence warning in templated function. */
bool isfinite(uchar /*value*/)
{
return true;
}
bool isfinite(half /*value*/)
{
return true;
}
bool isfinite(uint16_t /*value*/)
{
return true;
}

const char *name_from_type(ImageDataType type)
{
switch (type) {
Expand Down Expand Up @@ -628,7 +614,7 @@ bool ImageManager::file_load_image(Image *img, int texture_limit)
}

/* Make sure we don't have buggy values. */
if (FileFormat == TypeDesc::FLOAT) {
if constexpr (FileFormat == TypeDesc::FLOAT) {
/* For RGBA buffers we put all channels to 0 if either of them is not
* finite. This way we avoid possible artifacts caused by fully changed
* hue. */
Expand Down