summaryrefslogtreecommitdiff
path: root/graphics
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2016-04-16 21:30:23 +0000
committerDimitry Andric <dim@FreeBSD.org>2016-04-16 21:30:23 +0000
commit105a9c7d78f11bc68a3ef5620119595b76452f91 (patch)
tree0af2e6ebee2b36e3cda1b2f6bd057bee315abfef /graphics
parent- Install more benchmarks and tools (diff)
During the exp-run in bug 208158, it was found that graphics/gource
gives errors with libc++ 3.8.0: src/dirnode.cpp:585:27: error: no matching function for call to 'max' this->parent_radius = std::max(1.0, sqrt(total_file_area) * gGourceDirPadding); ^~~~~~~~ This is because max() is being called with two arguments of different type (double and float). Fix this by using 0.0f instead (and casting the result of sqrt to float like two lines above, though this should strictly not be necessary). Approved by: demon (maintainer) PR: 208844 MFH: 2016Q2
Notes
Notes: svn path=/head/; revision=413481
Diffstat (limited to 'graphics')
-rw-r--r--graphics/gource/files/patch-src_dirnode.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/graphics/gource/files/patch-src_dirnode.cpp b/graphics/gource/files/patch-src_dirnode.cpp
new file mode 100644
index 000000000000..81c20cb2e8d3
--- /dev/null
+++ b/graphics/gource/files/patch-src_dirnode.cpp
@@ -0,0 +1,11 @@
+--- src/dirnode.cpp.orig 2014-10-16 02:23:22 UTC
++++ src/dirnode.cpp
+@@ -582,7 +582,7 @@ void RDirNode::calcRadius() {
+ //this->dir_radius_sqrt = sqrt(dir_radius); //dir_radius_sqrt is not used
+
+ // this->parent_radius = std::max(1.0, parent_circ / PI);
+- this->parent_radius = std::max(1.0, sqrt(total_file_area) * gGourceDirPadding);
++ this->parent_radius = std::max(1.0f, (float)sqrt(total_file_area) * gGourceDirPadding);
+ }
+
+ float RDirNode::distanceToParent() const{