File tree Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Expand file tree Collapse file tree 1 file changed +5
-10
lines changed Original file line number Diff line number Diff line change @@ -872,19 +872,14 @@ template <typename Type, int NumElements> class vec {
872
872
873
873
// Special proxies as specialization is not allowed in class scope.
874
874
void setValue (int Index, const DataT &Value) {
875
- if (NumElements == 1 ) {
876
- setValue (Index, Value, (int )0 );
877
- } else {
878
- setValue (Index, Value, (float )0 );
879
- }
875
+ if (NumElements == 1 )
876
+ setValue (Index, Value, 0 );
877
+ else
878
+ setValue (Index, Value, 0 .f );
880
879
}
881
880
882
881
DataT getValue (int Index) const {
883
- if (NumElements == 1 ) {
884
- return getValue (Index, (int )0 );
885
- } else {
886
- return getValue (Index, (float )0 );
887
- }
882
+ return (NumElements == 1 ) ? getValue (Index, 0 ) : getValue (Index, 0 .f );
888
883
}
889
884
890
885
// Helpers for variadic template constructor of vec.
You can’t perform that action at this time.
0 commit comments