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

Fix -Wswitch warning (encountered on GCC - might also apply to CLang) #172

Open
wants to merge 1 commit into
base: master
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: 6 additions & 10 deletions image/imageFormat.inl
Original file line number Diff line number Diff line change
Expand Up @@ -52,10 +52,9 @@ inline const char* imageFormatToStr( imageFormat format )
case IMAGE_BAYER_RGGB: return "bayer-rggb";
case IMAGE_GRAY8: return "gray8";
case IMAGE_GRAY32F: return "gray32f";
case IMAGE_UNKNOWN: return "unknown";
case IMAGE_UNKNOWN:
default: return "unknown";
};

return "unknown";
}

// imageFormatIsRGB
Expand Down Expand Up @@ -143,12 +142,11 @@ inline imageBaseType imageFormatBaseType( imageFormat format )
{
case IMAGE_GRAY32F:
case IMAGE_RGB32F:
case IMAGE_BGR32F:
case IMAGE_BGR32F:
case IMAGE_RGBA32F:
case IMAGE_BGRA32F: return IMAGE_FLOAT;
default: return IMAGE_UINT8;
}

return IMAGE_UINT8;
}


Expand Down Expand Up @@ -177,9 +175,8 @@ inline size_t imageFormatChannels( imageFormat format )
case IMAGE_BAYER_GBRG:
case IMAGE_BAYER_GRBG:
case IMAGE_BAYER_RGGB: return 1;
default: return 0;
}

return 0;
}


Expand Down Expand Up @@ -208,9 +205,8 @@ inline size_t imageFormatDepth( imageFormat format )
case IMAGE_BAYER_GBRG:
case IMAGE_BAYER_GRBG:
case IMAGE_BAYER_RGGB: return sizeof(unsigned char) * 8;
default: return 0;
}

return 0;
}


Expand Down