[Marble-devel] Marble win32 compile fix

Michael Drüing michael at drueing.de
Tue Oct 14 23:09:05 CEST 2008


Hi,

Here's a small fix for compiling marble on Win32 w/ MSVC.
Visual Studio has a habit of issuing an error if an ambiguous overloaded
function is called with non-uniquely identifiable parameters, in this case
fabs().

This patch will fix this.

Greetings
-Michael

Index: marble/src/lib/Projections/SphericalProjection.cpp
===================================================================
--- marble/src/lib/Projections/SphericalProjection.cpp	(revision 871408)
+++ marble/src/lib/Projections/SphericalProjection.cpp	(working copy)
@@ -263,7 +263,7 @@
 
                 // We take the manhattan length as a distance approximation
                 // that can be too big by a factor of sqrt(2)
-                qreal distance =   fabs(x - previousX) + fabs(y -
previousY);
+                qreal distance =   fabs((qreal)(x - previousX)) +
fabs((qreal)(y - previousY));
 
                 // FIXME: This is a work around: remove as soon as we
handle horizon crossing
                 if ( globeHidesPoint || previousGlobeHidesPoint ) { 

-------------- next part --------------
A non-text attachment was scrubbed...
Name: marble_win32_compile_fix.patch
Type: application/octet-stream
Size: 773 bytes
Desc: not available
Url : http://mail.kde.org/pipermail/marble-devel/attachments/20081014/ba784e85/attachment.dll 


More information about the Marble-devel mailing list