So I was cleaning up all the warnings in release 2.4 and ran across the following warning:
1>c:\work\ibm\self\lib\libqi\src\type\anyreference.cpp(404): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
Looking at the code, there seems to be an error here on this line:
mustDestroy.assign(false, mustDestroy.size());
In std::vector::assign, the first argument is the size, the 2nd argument is the value to assign into the vector. I think the author intended to do this instead:
mustDestroy.assign( mustDestroy.size(), false );
This does fix the warning... However, I'm unsure about the intent .. do we want the Cleanup() object to delete the objects or not.
So I was cleaning up all the warnings in release 2.4 and ran across the following warning: 1>c:\work\ibm\self\lib\libqi\src\type\anyreference.cpp(404): warning C4800: 'unsigned int': forcing value to bool 'true' or 'false' (performance warning)
Looking at the code, there seems to be an error here on this line: mustDestroy.assign(false, mustDestroy.size());
In std::vector::assign, the first argument is the size, the 2nd argument is the value to assign into the vector. I think the author intended to do this instead:
This does fix the warning... However, I'm unsure about the intent .. do we want the Cleanup() object to delete the objects or not.