Skip to content

Commit 8c768b2

Browse files
committed
Working around another stupid G++ compiler bug
1 parent e2a7569 commit 8c768b2

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

source/Colors/TColor.inl

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -112,24 +112,24 @@ namespace Langulus::Math
112112
// Attempt converting from any other kinds of numbers
113113
Typelists::Arithmetic::ForEachOr([&]<class AS>{
114114
if constexpr (not CT::Similar<InnerT, AS>) {
115-
AS all_as[MemberCount];
115+
AS all_as[TColor::MemberCount];
116116
initialized = describe->ExtractData(all_as);
117117
if (initialized) {
118-
if constexpr (IsReal and CT::Integer<AS>) {
118+
if constexpr (TColor::IsReal and CT::Integer<AS>) {
119119
// If we're initializing real color using integers,
120120
// we have to divide by 255 and saturate (TODO)
121-
SIMD::Convert<Default>(all_as, all);
121+
SIMD::Convert<TColor::Default>(all_as, this->all);
122122
*this /= InnerT {255};
123123
}
124-
else if constexpr (not IsReal and CT::Real<AS>) {
124+
else if constexpr (not TColor::IsReal and CT::Real<AS>) {
125125
// If we're initializing integer color using reals,
126126
// we have to multiply by 255 and saturate
127127
SIMD::Multiply(all_as, AS {255}, all_as);
128128
SIMD::Min(all_as, InnerT {255}, all_as);
129129
SIMD::Max(all_as, InnerT {0}, all_as);
130-
SIMD::Convert<Default>(all_as, all);
130+
SIMD::Convert<TColor::Default>(all_as, this->all);
131131
}
132-
else SIMD::Convert<Default>(all_as, all);
132+
else SIMD::Convert<TColor::Default>(all_as, this->all);
133133
}
134134
return initialized > 0;
135135
}

source/Vectors/TVector.inl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -135,10 +135,10 @@ namespace Langulus::Math
135135
// Attempt converting from any other kinds of numbers
136136
Typelists::Arithmetic::ForEachOr([&]<class AS>{
137137
if constexpr (not CT::Similar<T, AS>) {
138-
AS all_as[S];
138+
AS all_as[TVector::MemberCount];
139139
initialized = describe->ExtractData(all_as);
140140
if (initialized)
141-
SIMD::Convert<Default>(all_as, all);
141+
SIMD::Convert<TVector::Default>(all_as, this->all);
142142
return initialized > 0;
143143
}
144144
else return false;

0 commit comments

Comments
 (0)