Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UndoHistory.cpp error #73

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

UndoHistory.cpp error #73

kmiasko opened this issue Aug 3, 2010 · 2 comments

Comments

@kmiasko
Copy link

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
Copy link
Contributor

Is this error from a fork of my repo?

@ajpalkovic
Copy link
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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants