Fix implicit conversion issues with Xcode 7.3

This commit is contained in:
mogemimi 2016-04-07 17:01:17 +09:00
parent 328331df4f
commit c0e4780e77
2 changed files with 2 additions and 2 deletions

View File

@ -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;

View File

@ -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;