Added explicit casts to allow for compilation under -pedantic
Merge pull request #304 from ryanplusplus/FixComparisonBetweenSignedAndUnsigned

Added explicit casts to allow for compilation under -pedantic