I kind of ran into a minor snag and was wondering how can I go about comparing a int to the value returned by Vector.size()?
My current code will always trigger the top portion of the If statement, because of the int to size_t comparison. So I am a little unsure if I should just cast pool.size() to a int or is there a better way?
poolIndex is the current pool item I am using in the pool vector. EG: pool[poolIndex].DoStuff()
Current code:
//In init code (pool starts off as having nothing in it)
poolIndex = 0;
if (poolIndex <= pool.size() - 1)
{
Logger::Verbose("native", "Available space in the pool");
}
else
{
Logger::Verbose("native", "No free space available. Need to create new space...");
}