Commit 13ceaf52 authored by Michael Pyne's avatar Michael Pyne
Browse files

Fix Solaris compilation error by using C++ math facilities instead of C's. (Apparently

Solaris chokes on the C library struct exception and the C++ std::exception even though
std::exception is used once in JuK, and with the fully resolved name.)

Note that I do not intend to backport this to 4.3 yet in case this somehow causes
compile failures (although it's 2009 people, C++ systems that don't support <cmath> are
broken :P)


svn path=/trunk/KDE/kdemultimedia/juk/; revision=1036321
parent 3c175c74
......@@ -59,7 +59,7 @@
#include <id3v1genres.h>
#include <time.h>
#include <math.h>
#include <cmath>
#include <dirent.h>
#include "playlistitem.h"
......@@ -1823,13 +1823,13 @@ void Playlist::calculateColumnWeights()
foreach(PlaylistItem *item, l) {
cachedWidth = item->cachedWidths();
foreach(int column, m_weightDirty)
averageWidth[column] += pow(double(cachedWidth[column]), 2.0) / itemCount;
averageWidth[column] += std::pow(double(cachedWidth[column]), 2.0) / itemCount;
m_columnWeights.fill(-1, columns());
foreach(int column, m_weightDirty) {
m_columnWeights[column] = int(sqrt(averageWidth[column]) + 0.5);
m_columnWeights[column] = int(std::sqrt(averageWidth[column]) + 0.5);
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment