error in template code

Bug #1178257 reported by Emmanuel
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Stellarium
Fix Released
Medium
Emmanuel

Bug Description

A compilation error appears while compiling a custom plugin which uses otherwise unused template code.

The error message is:
stellarium-0.12.0/src/core/VecMath.hpp:698:50: erreur: no match for ‘operator-=’ in ‘((Vector4<double>*)this)->Vector4<double>::v[3] -= (& a)->Vector4<T>::operator/<double>(((Vector4<double>*)this)->Vector4<double>::v[3])

This can be traced back to a typo in VecMath.hpp file:
 691 template<class T> void Vector4<T>::operator+=(const Vector4<T>& a)
 692 {
 693 v[0] += a.v[0]; v[1] += a.v[1]; v[2] += a.v[2]; v[3] += a.v[3];
 694 }
 695
 696 template<class T> void Vector4<T>::operator-=(const Vector4<T>& a)
 697 {
 698 v[0] -= a.v[0]; v[1] -= a.v[1]; v[2] -= a.v[2]; v[3] -= a/v[3];
 699 }
 700

At line 698 there is a "/" instead of a "." in the computation of v[3].

Related branches

Changed in stellarium:
milestone: none → 0.12.2
assignee: nobody → Emmanuel (hacker-emmanuel)
status: New → Fix Committed
importance: Undecided → Medium
Changed in stellarium:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.