1
0
mirror of https://github.com/vcmi/vcmi.git synced 2024-11-28 08:48:48 +02:00

- Compile fixes

This commit is contained in:
beegee1 2013-01-08 18:32:47 +00:00
parent d8b068afd9
commit 6d0221c0e7
2 changed files with 13 additions and 1 deletions

View File

@ -11,14 +11,26 @@
#pragma once
#include <boost/version.hpp>
#include <boost/random/mersenne_twister.hpp>
#if BOOST_VERSION >= 104700
#include <boost/random/uniform_int_distribution.hpp>
#include <boost/random/uniform_real_distribution.hpp>
#else
#include <boost/random/uniform_int.hpp>
#include <boost/random/uniform_real.hpp>
#endif
#include <boost/random/variate_generator.hpp>
typedef boost::mt19937 TGenerator;
#if BOOST_VERSION >= 104700
typedef boost::random::uniform_int_distribution<int> TIntDist;
typedef boost::random::uniform_real_distribution<double> TRealDist;
#else
typedef boost::uniform_int<int> TIntDist;
typedef boost::uniform_real<double> TRealDist;
#endif
typedef boost::variate_generator<TGenerator &, TIntDist> TRandI;
typedef boost::variate_generator<TGenerator &, TRealDist> TRand;

View File

@ -258,7 +258,7 @@ CMapEditManager::ValidationResult CMapEditManager::validateTerrainView(int posx,
const std::pair<std::string, int> & rulePair = pattern.data[i][j];
const std::string & rule = rulePair.first;
bool isNative = (rule == TerrainViewPattern::RULE_NATIVE || rule == TerrainViewPattern::RULE_ANY) && !isAlien;
auto validationRslt = [&](bool rslt)
auto validationRslt = [&](bool rslt) -> bool
{
if(rslt)
{