GCC 4.3 fixes, thanks to Tom Browder

git-svn-id: svn://svn.code.sf.net/p/loki-lib/code/trunk@898 7ec92016-0320-0410-acc4-a06ded1c099a
This commit is contained in:
syntheticpp 2008-08-09 15:35:12 +00:00
parent 1ca2df042d
commit c6d6cada99
4 changed files with 9 additions and 13 deletions

View file

@ -516,7 +516,7 @@ namespace Loki
{
if(m_vKeys.empty())
throw EvictionException();
size_type random = static_cast<size_type>((m_vKeys.size()*rand())/int(RAND_MAX + 1));
size_type random = static_cast<size_type>((m_vKeys.size()*rand())/(static_cast<size_type>(RAND_MAX) + 1));
remove(*(m_vKeys.begin()+random));
}
const char* name(){return "random";}