mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-25 22:42:04 +02:00
Compile fixes specific for VS 2012"
* Reverted std::bind to boost::bind. std::bind on Visual 2012 doesn't work in some cases (especially with std::ref), not sure why [but it seems to be a bug, since 2013 preview compiles the same code fine]. * Move assignment operator for VS 2012.
This commit is contained in:
@@ -38,7 +38,7 @@ public:
|
||||
/// e.g.: auto a = gen.getRangeI(0,10); a(); a(); a();
|
||||
TRandI getRangeI(int lower, int upper)
|
||||
{
|
||||
return std::bind(TIntDist(lower, upper), gen);
|
||||
return boost::bind(TIntDist(lower, upper), gen);
|
||||
}
|
||||
|
||||
int getInteger(int lower, int upper)
|
||||
@@ -50,7 +50,7 @@ public:
|
||||
/// e.g.: auto a = gen.getRangeI(0,10); a(); a(); a();
|
||||
TRand getRange(double lower, double upper)
|
||||
{
|
||||
return std::bind(TRealDist(lower, upper), gen);
|
||||
return boost::bind(TRealDist(lower, upper), gen);
|
||||
}
|
||||
|
||||
double getDouble(double lower, double upper)
|
||||
|
||||
Reference in New Issue
Block a user