svn commit: r413481 - head/graphics/gource/files

Dimitry Andric dim at FreeBSD.org
Sat Apr 16 21:30:24 UTC 2016


Author: dim (src committer)
Date: Sat Apr 16 21:30:23 2016
New Revision: 413481
URL: https://svnweb.freebsd.org/changeset/ports/413481

Log:
  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

Added:
  head/graphics/gource/files/
  head/graphics/gource/files/patch-src_dirnode.cpp   (contents, props changed)

Added: head/graphics/gource/files/patch-src_dirnode.cpp
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/graphics/gource/files/patch-src_dirnode.cpp	Sat Apr 16 21:30:23 2016	(r413481)
@@ -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{


More information about the svn-ports-all mailing list