summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLioncash <mathew1800@gmail.com>2016-01-28 04:14:17 +0100
committerLioncash <mathew1800@gmail.com>2016-01-28 04:14:17 +0100
commit60fe45813b480f8264ddd78972ead7af359ecee8 (patch)
tree9a7a1f11dc7be8f530c9cb4a83561b3eaa4c03e9 /src
parentMerge pull request #1367 from yuriks/jit-jmp (diff)
downloadyuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar.gz
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar.bz2
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar.lz
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar.xz
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.tar.zst
yuzu-60fe45813b480f8264ddd78972ead7af359ecee8.zip
Diffstat (limited to 'src')
-rw-r--r--src/common/color.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/common/color.h b/src/common/color.h
index eb199e308..908879ea6 100644
--- a/src/common/color.h
+++ b/src/common/color.h
@@ -11,42 +11,42 @@
namespace Color {
/// Convert a 1-bit color component to 8 bit
-inline u8 Convert1To8(u8 value) {
+constexpr u8 Convert1To8(u8 value) {
return value * 255;
}
/// Convert a 4-bit color component to 8 bit
-inline u8 Convert4To8(u8 value) {
+constexpr u8 Convert4To8(u8 value) {
return (value << 4) | value;
}
/// Convert a 5-bit color component to 8 bit
-inline u8 Convert5To8(u8 value) {
+constexpr u8 Convert5To8(u8 value) {
return (value << 3) | (value >> 2);
}
/// Convert a 6-bit color component to 8 bit
-inline u8 Convert6To8(u8 value) {
+constexpr u8 Convert6To8(u8 value) {
return (value << 2) | (value >> 4);
}
/// Convert a 8-bit color component to 1 bit
-inline u8 Convert8To1(u8 value) {
+constexpr u8 Convert8To1(u8 value) {
return value >> 7;
}
/// Convert a 8-bit color component to 4 bit
-inline u8 Convert8To4(u8 value) {
+constexpr u8 Convert8To4(u8 value) {
return value >> 4;
}
/// Convert a 8-bit color component to 5 bit
-inline u8 Convert8To5(u8 value) {
+constexpr u8 Convert8To5(u8 value) {
return value >> 3;
}
/// Convert a 8-bit color component to 6 bit
-inline u8 Convert8To6(u8 value) {
+constexpr u8 Convert8To6(u8 value) {
return value >> 2;
}