mirror of https://github.com/axmolengine/axmol.git
Fix implicit conversion issues with Xcode 7.3
This commit is contained in:
parent
328331df4f
commit
c0e4780e77
|
@ -346,7 +346,7 @@ public:
|
|||
{
|
||||
if (!_data.empty())
|
||||
{
|
||||
ssize_t randIdx = RandomHelper::random_int<int>(0, _data.size()-1);
|
||||
ssize_t randIdx = RandomHelper::random_int<int>(0, static_cast<int>(_data.size()) - 1);
|
||||
const_iterator randIter = _data.begin();
|
||||
std::advance(randIter , randIdx);
|
||||
return randIter->second;
|
||||
|
|
|
@ -288,7 +288,7 @@ public:
|
|||
{
|
||||
if (!_data.empty())
|
||||
{
|
||||
ssize_t randIdx = RandomHelper::random_int<int>(0,_data.size()-1);
|
||||
ssize_t randIdx = RandomHelper::random_int<int>(0, static_cast<int>(_data.size()) - 1);
|
||||
return *(_data.begin() + randIdx);
|
||||
}
|
||||
return nullptr;
|
||||
|
|
Loading…
Reference in New Issue