UndoHistory.cpp error #73

Open
kmiasko opened this Issue Aug 3, 2010 · 2 comments

Projects

None yet

2 participants

@kmiasko
kmiasko commented Aug 3, 2010

UndoHistory.cpp: In member function ‘void UndoHistory::OnMouseWheel(wxMouseEvent&)’:
UndoHistory.cpp:379: error: call of overloaded ‘abs(const double&)’ is ambiguous
/usr/include/stdlib.h:766: note: candidates are: int abs(int)
/usr/include/c++/4.4/cstdlib:170: note: long long int __gnu_cxx::abs(long long int)
/usr/include/c++/4.4/cstdlib:139: note: long int std::abs(long int)

abs on linux system takes only int
line 379 const double linescount = (abs(rotation)
should be const double linescount = (fabs(rotation)

@ajpalkovic
Contributor

Is this error from a fork of my repo?

@ajpalkovic
Contributor

Honestly, the easiest way to fit it to just define an abs function in that file...
double abs(double value) { return value < 0 ? -1.0 * value : value; }

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment