mirror of
https://github.com/PabloMK7/citra.git
synced 2024-11-25 00:44:05 +00:00
common/color: Remove unnecessary const qualifiers on return types
These are just superfluous and not necessesary
This commit is contained in:
parent
b956a2be1c
commit
319d685b13
1 changed files with 7 additions and 7 deletions
|
@ -57,7 +57,7 @@ constexpr u8 Convert8To6(u8 value) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRGBA8(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRGBA8(const u8* bytes) {
|
||||||
return {bytes[3], bytes[2], bytes[1], bytes[0]};
|
return {bytes[3], bytes[2], bytes[1], bytes[0]};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ inline const Math::Vec4<u8> DecodeRGBA8(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRGB8(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRGB8(const u8* bytes) {
|
||||||
return {bytes[2], bytes[1], bytes[0], 255};
|
return {bytes[2], bytes[1], bytes[0], 255};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -75,7 +75,7 @@ inline const Math::Vec4<u8> DecodeRGB8(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRG8(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRG8(const u8* bytes) {
|
||||||
return {bytes[1], bytes[0], 0, 255};
|
return {bytes[1], bytes[0], 0, 255};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -84,7 +84,7 @@ inline const Math::Vec4<u8> DecodeRG8(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRGB565(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRGB565(const u8* bytes) {
|
||||||
u16_le pixel;
|
u16_le pixel;
|
||||||
std::memcpy(&pixel, bytes, sizeof(pixel));
|
std::memcpy(&pixel, bytes, sizeof(pixel));
|
||||||
return {Convert5To8((pixel >> 11) & 0x1F), Convert6To8((pixel >> 5) & 0x3F),
|
return {Convert5To8((pixel >> 11) & 0x1F), Convert6To8((pixel >> 5) & 0x3F),
|
||||||
|
@ -96,7 +96,7 @@ inline const Math::Vec4<u8> DecodeRGB565(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRGB5A1(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRGB5A1(const u8* bytes) {
|
||||||
u16_le pixel;
|
u16_le pixel;
|
||||||
std::memcpy(&pixel, bytes, sizeof(pixel));
|
std::memcpy(&pixel, bytes, sizeof(pixel));
|
||||||
return {Convert5To8((pixel >> 11) & 0x1F), Convert5To8((pixel >> 6) & 0x1F),
|
return {Convert5To8((pixel >> 11) & 0x1F), Convert5To8((pixel >> 6) & 0x1F),
|
||||||
|
@ -108,7 +108,7 @@ inline const Math::Vec4<u8> DecodeRGB5A1(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source color
|
* @param bytes Pointer to encoded source color
|
||||||
* @return Result color decoded as Math::Vec4<u8>
|
* @return Result color decoded as Math::Vec4<u8>
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec4<u8> DecodeRGBA4(const u8* bytes) {
|
inline Math::Vec4<u8> DecodeRGBA4(const u8* bytes) {
|
||||||
u16_le pixel;
|
u16_le pixel;
|
||||||
std::memcpy(&pixel, bytes, sizeof(pixel));
|
std::memcpy(&pixel, bytes, sizeof(pixel));
|
||||||
return {Convert4To8((pixel >> 12) & 0xF), Convert4To8((pixel >> 8) & 0xF),
|
return {Convert4To8((pixel >> 12) & 0xF), Convert4To8((pixel >> 8) & 0xF),
|
||||||
|
@ -140,7 +140,7 @@ inline u32 DecodeD24(const u8* bytes) {
|
||||||
* @param bytes Pointer to encoded source values
|
* @param bytes Pointer to encoded source values
|
||||||
* @return Resulting values stored as a Math::Vec2
|
* @return Resulting values stored as a Math::Vec2
|
||||||
*/
|
*/
|
||||||
inline const Math::Vec2<u32> DecodeD24S8(const u8* bytes) {
|
inline Math::Vec2<u32> DecodeD24S8(const u8* bytes) {
|
||||||
return {static_cast<u32>((bytes[2] << 16) | (bytes[1] << 8) | bytes[0]), bytes[3]};
|
return {static_cast<u32>((bytes[2] << 16) | (bytes[1] << 8) | bytes[0]), bytes[3]};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue