Skip to content

Commit

Permalink
Merge pull request #14 from ros-geographic-info/fix-indigo-test-compi…
Browse files Browse the repository at this point in the history
…lation

Fix for compilation bug on GCC 4.7+, ticket #12
  • Loading branch information
jack-oquin committed Aug 30, 2014
2 parents 4cdadcd + 479e0e0 commit 02f0957
Showing 1 changed file with 15 additions and 9 deletions.
24 changes: 15 additions & 9 deletions geodesy/include/geodesy/wgs84.h
Expand Up @@ -71,18 +71,11 @@ namespace geodesy
* toMsg() functions for both points and poses.
*/
template <class From, class To>
void convert(const From &from, To &to)
{
fromMsg(toMsg(from), to);
}
void convert(const From &from, To &to);

/** Convert any coordinate to itself. */
template <class Same>
void convert(const Same &from, Same &to)
{
if (&from != &to)
to = from;
}
void convert(const Same &from, Same &to);

/** Convert one WGS 84 geodetic point to another.
*
Expand Down Expand Up @@ -230,6 +223,19 @@ namespace geodesy
return from;
}

template <class From, class To>
void convert(const From &from, To &to)
{
fromMsg(toMsg(from), to);
}

template <class Same>
void convert(const Same &from, Same &to)
{
if (&from != &to)
to = from;
}

}; // namespace geodesy

#endif // _WGS84_H_

0 comments on commit 02f0957

Please sign in to comment.