Created attachment 169379 [details] Fix argument type for max() in games/kuklomenos During the exp-run in bug 208158, it was found that games/kuklomenos gives errors with libc++ 3.8.0 [1]: node.cc:178:7: error: no matching function for call to 'max' std::max(0.0, 1 - ( fabs(angleDiff(spin*3, 0)) * 2 )) ); ^~~~~~~~ This is because max() is being called with two arguments of different type (double and float). Fix this by using 0.0f instead. [1] http://package18.nyi.freebsd.org/data/headamd64PR208158-default/2016-03-22_18h30m05s/logs/errors/kuklomenos-0.4.5_4.log
Testbuilds on 11a, 10.3a+i, 9.3a all fail because std::max is not known ? Did I miss something ?
Created attachment 169442 [details] Fix argument type for max() in games/kuklomenos Right, I didn't realize that for earlier versions of libc++, the fabs() prototype is such that it always returns double. In that case, the std::max invocation will still be with differently typed arguments, causing complaints. I now replaced the fabs() call with fabsf(), so now both arguments to std::max are *really* floats.
Committed, thanks!
A commit references this bug: Author: pi Date: Mon Apr 18 16:52:26 UTC 2016 New revision: 413588 URL: https://svnweb.freebsd.org/changeset/ports/413588 Log: games/kuklomenos: Fix build with libc++ 3.8.0 PR: 208842 Submitted by: dim Changes: head/games/kuklomenos/files/ head/games/kuklomenos/files/patch-node.cc