windows: fix compilation for 32-bit target

The CI shouldn't be trying to build this, but this is what was blocking
its builds on windows.
This commit is contained in:
Wez Furlong committed 2020-01-17 10:12:25 -08:00
1 parent 5ffd703d92
commit dc0573457c
1 file changed
+11 -8
+11 -8
View File
@@ -194,15 +194,18 @@ impl From<LinSrgba> for Color {
#[inline]
#[allow(clippy::many_single_char_names)]
fn from(s: LinSrgba) -> Color {
if is_x86_feature_detected!("sse2") {
linear_f32_to_srgb8_vec(s)
} else {
let r = linear_f32_to_srgb8_using_table(s.red);
let g = linear_f32_to_srgb8_using_table(s.green);
let b = linear_f32_to_srgb8_using_table(s.blue);
let a = linear_f32_to_srgb8_using_table(s.alpha);
Color::rgba(r, g, b, a)
#[cfg(target_arch = "x86_64")]
{
if is_x86_feature_detected!("sse2") {
return linear_f32_to_srgb8_vec(s);
}
}
let r = linear_f32_to_srgb8_using_table(s.red);
let g = linear_f32_to_srgb8_using_table(s.green);
let b = linear_f32_to_srgb8_using_table(s.blue);
let a = linear_f32_to_srgb8_using_table(s.alpha);
Color::rgba(r, g, b, a)
}
}