Added more parts of patch #911.

This commit is contained in:
Mark de Wever 2008-01-01 19:11:19 +00:00
parent b16d6fa231
commit b67011171c
7 changed files with 13 additions and 7 deletions

View file

@ -29,6 +29,7 @@ Version 1.3.13+svn:
fixed in a later state. This could lead to some units not leveling
properly (bug #10304)
* validate vector access for colours (bug #10622)
* added serveral fixes to compile with Sun Studio compiler (patch #911)
Version 1.3.13:
* campaigns:

View file

@ -34,6 +34,8 @@
#include "wml_separators.hpp"
#include "widgets/progressbar.hpp"
#include <clocale>
#define LOG_NG LOG_STREAM(info, engine)
#define LOG_DP LOG_STREAM(info, display)

View file

@ -35,6 +35,7 @@
#include "serialization/string_utils.hpp"
#include <cctype>
#include <clocale>
#include <cstdlib>
#include <iostream>
#include <map>

View file

@ -63,6 +63,7 @@
#include "wesconfig.h"
#include <clocale>
#include <cmath>
#include <cstdlib>
#include <ctime>

View file

@ -18,14 +18,9 @@
#include <map>
#include <vector>
#include "config.hpp"
#include "network.hpp"
#include "SDL_net.h"
namespace network
{
struct statistics;
}
namespace network_worker_pool
{

View file

@ -30,7 +30,7 @@ static int calculate_volume(int x, int y, const display &disp)
// An obscure formula to calculate SDL_Mixer's "distance" based on the source's
// distance from screen's center
return maximum<int>(0, 128 * static_cast<int>(sqrt(dx + dy) / (sqrt(area.w*area.w + area.h * area.h))));
return maximum<int>(0, 128 * static_cast<int>(std::sqrt((double) (dx + dy)) / (sqrt((double) (area.w*area.w + area.h * area.h)))));
}
namespace soundsource {

View file

@ -34,7 +34,13 @@ class display;
#define __FUNCTION__ "(Unspecified)"
#endif
#endif
// Sun Studio compilers call __func__ not __FUNCTION__
#ifdef __SUNPRO_CC
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __func__, message)
#else
#define VALIDATE(cond, message) if(!(cond)) wml_exception(#cond, __FILE__, __LINE__, __FUNCTION__, message)
#endif
//! Helper function, don't call this directly.
void wml_exception(const char* cond, const char* file,